summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2000-12-01 04:55:52 +0000
committerjake <jake@FreeBSD.org>2000-12-01 04:55:52 +0000
commit95fb73d49504aef8d7a10a5e1a9e4fcd7af9492c (patch)
tree02209e46b99f02aa700026a0d2525a4af3e528ee
parentc91f8bd1fb2414d034600b374cbf8f241621b7f8 (diff)
downloadFreeBSD-src-95fb73d49504aef8d7a10a5e1a9e4fcd7af9492c.zip
FreeBSD-src-95fb73d49504aef8d7a10a5e1a9e4fcd7af9492c.tar.gz
Use an mp-safe callout for endtsleep.
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_fork.c2
-rw-r--r--sys/kern/kern_synch.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index d251030..c6110fa 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -313,7 +313,7 @@ proc0_init(void *dummy __unused)
bcopy("swapper", p->p_comm, sizeof ("swapper"));
callout_init(&p->p_itcallout, 0);
- callout_init(&p->p_slpcallout, 0);
+ callout_init(&p->p_slpcallout, 1);
/* Create credentials. */
cred0.p_refcnt = 1;
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index ca40474..e9cf587 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -484,7 +484,7 @@ again:
LIST_INIT(&p2->p_contested);
callout_init(&p2->p_itcallout, 0);
- callout_init(&p2->p_slpcallout, 0);
+ callout_init(&p2->p_slpcallout, 1);
#ifdef KTRACE
/*
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index cb8e655..a14abb2 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -273,6 +273,7 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, "");
/*
* Recompute process priorities, every hz ticks.
+ * MP-safe, called without the Giant mutex.
*/
/* ARGSUSED */
static void
@@ -745,6 +746,7 @@ out:
* If process hasn't been awakened (wchan non-zero),
* set timeout flag and undo the sleep. If proc
* is stopped, just unsleep so it will remain stopped.
+ * MP-safe, called without the Giant mutex.
*/
static void
endtsleep(arg)
OpenPOWER on IntegriCloud