projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
style, 64-bit changes, update printfs for reality, sleep -> tsleep.
[unix-history]
/
usr
/
src
/
sys
/
vm
/
vm_glue.c
diff --git
a/usr/src/sys/vm/vm_glue.c
b/usr/src/sys/vm/vm_glue.c
index
cfcbe0e
..
abfa61d
100644
(file)
--- a/
usr/src/sys/vm/vm_glue.c
+++ b/
usr/src/sys/vm/vm_glue.c
@@
-7,7
+7,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)vm_glue.c 8.
7
(Berkeley) %G%
+ * @(#)vm_glue.c 8.
8
(Berkeley) %G%
*
*
* Copyright (c) 1987, 1990 Carnegie-Mellon University.
*
*
* Copyright (c) 1987, 1990 Carnegie-Mellon University.
@@
-292,7
+292,7
@@
scheduler()
loop:
#ifdef DEBUG
while (!enableswap)
loop:
#ifdef DEBUG
while (!enableswap)
-
sleep((caddr_t)&proc0, PVM
);
+
tsleep((caddr_t)&proc0, PVM, "noswap", 0
);
#endif
pp = NULL;
ppri = INT_MIN;
#endif
pp = NULL;
ppri = INT_MIN;
@@
-307,13
+307,13
@@
loop:
}
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
}
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
- printf("sched: running, procp %x pri %d\n", pp, ppri);
+ printf("sched
uler
: running, procp %x pri %d\n", pp, ppri);
#endif
/*
* Nothing to do, back to sleep
*/
if ((p = pp) == NULL) {
#endif
/*
* Nothing to do, back to sleep
*/
if ((p = pp) == NULL) {
-
sleep((caddr_t)&proc0, PVM
);
+
tsleep((caddr_t)&proc0, PVM, "scheduler", 0
);
goto loop;
}
goto loop;
}
@@
-352,7
+352,7
@@
loop:
*/
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
*/
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
- printf("sched: no room for pid %d(%s), free %d\n",
+ printf("sched
uler
: no room for pid %d(%s), free %d\n",
p->p_pid, p->p_comm, cnt.v_free_count);
#endif
(void) splhigh();
p->p_pid, p->p_comm, cnt.v_free_count);
#endif
(void) splhigh();
@@
-360,7
+360,7
@@
loop:
(void) spl0();
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
(void) spl0();
#ifdef DEBUG
if (swapdebug & SDB_FOLLOW)
- printf("sched: room again, free %d\n", cnt.v_free_count);
+ printf("sched
uler
: room again, free %d\n", cnt.v_free_count);
#endif
goto loop;
}
#endif
goto loop;
}
@@
-501,7
+501,7
@@
swapout(p)
void
assert_wait(event, ruptible)
void
assert_wait(event, ruptible)
-
int
event;
+
void *
event;
boolean_t ruptible;
{
#ifdef lint
boolean_t ruptible;
{
#ifdef lint
@@
-516,35
+516,35
@@
thread_block()
int s = splhigh();
if (curproc->p_thread)
int s = splhigh();
if (curproc->p_thread)
-
sleep((caddr_t)curproc->p_thread, PVM
);
+
tsleep(curproc->p_thread, PVM, "thrd_block", 0
);
splx(s);
}
void
thread_sleep(event, lock, ruptible)
splx(s);
}
void
thread_sleep(event, lock, ruptible)
-
int
event;
+
void *
event;
simple_lock_t lock;
boolean_t ruptible;
{
simple_lock_t lock;
boolean_t ruptible;
{
+ int s = splhigh();
+
#ifdef lint
ruptible++;
#endif
#ifdef lint
ruptible++;
#endif
- int s = splhigh();
-
curproc->p_thread = event;
simple_unlock(lock);
if (curproc->p_thread)
curproc->p_thread = event;
simple_unlock(lock);
if (curproc->p_thread)
-
sleep((caddr_t)event, PVM
);
+
tsleep(event, PVM, "thrd_sleep", 0
);
splx(s);
}
void
thread_wakeup(event)
splx(s);
}
void
thread_wakeup(event)
-
int
event;
+
void *
event;
{
int s = splhigh();
{
int s = splhigh();
- wakeup(
(caddr_t)
event);
+ wakeup(event);
splx(s);
}
splx(s);
}