From fd45bacb9e4182a2583ae901b4fdd5c5be3ddf7d Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Tue, 13 Feb 2001 21:00:49 +0000 Subject: More sane spl handling. Don't just assume that we're called at spl0. --- sys/kern/kern_fork.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') 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. -- cgit v1.2.3