diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-02-13 21:00:49 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-02-13 21:00:49 +0000 |
commit | fd45bacb9e4182a2583ae901b4fdd5c5be3ddf7d (patch) | |
tree | f44f22383c1fb8450736e7850fa4eaaaa8e71762 /sys/kern | |
parent | 480ea3fe0ef7f9f61b8287a36f944b71df3fa98a (diff) |
More sane spl handling. Don't just assume that we're called at spl0.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_fork.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 3a8f4173220..e7fbaae0a56 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.36 2000/11/16 20:02:17 provos Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.37 2001/02/13 21:00:48 art Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -148,6 +148,7 @@ fork1(p1, flags, stack, stacksize, retval) int count; static int pidchecked = 0; vaddr_t uaddr; + int s; extern void endtsleep __P((void *)); extern void realitexpire __P((void *)); @@ -404,12 +405,12 @@ again: /* * Make child runnable, set start time, and add to run queue. */ - (void) splstatclock(); + s = splstatclock(); p2->p_stats->p_start = time; p2->p_acflag = AFORK; p2->p_stat = SRUN; setrunqueue(p2); - (void) spl0(); + splx(s); /* * Now can be swapped. |