From d7e3a89f1f0897f5b28f36414d8f782f13d4ae62 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 21 Jan 1995 15:08:57 +0000 Subject: [PATCH] Don't count the parent's previous timeslice in the child's resource usage (it was counted twice). Set the start time more accurately. --- sys/kern/kern_fork.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index b151b8459df9..4f5a75486028 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $Id: kern_fork.c,v 1.8 1994/10/09 07:34:55 davidg Exp $ + * $Id: kern_fork.c,v 1.9 1994/10/10 01:00:43 phk Exp $ */ #include @@ -289,9 +289,8 @@ fork1(p1, isvfork, retval) /* * Child process. Set start time and get to work. */ - (void) splclock(); - p2->p_stats->p_start = time; - (void) spl0(); + microtime(&runtime); + p2->p_stats->p_start = runtime; p2->p_acflag = AFORK; return (0); }