summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-01-21 15:08:57 +0000
committerbde <bde@FreeBSD.org>1995-01-21 15:08:57 +0000
commit04e6e915b1ce307ce013c24981c340f9673ecf66 (patch)
treec70c143c414d48dabb942ccb5557bb4447ddf746 /sys/kern/kern_fork.c
parenta3fa4eb69e0f5fb2faf2f49033df9b74f93a3d8d (diff)
downloadFreeBSD-src-04e6e915b1ce307ce013c24981c340f9673ecf66.zip
FreeBSD-src-04e6e915b1ce307ce013c24981c340f9673ecf66.tar.gz
Don't count the parent's previous timeslice in the child's resource usage
(it was counted twice). Set the start time more accurately.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index b151b84..4f5a754 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 <sys/param.h>
@@ -289,9 +289,8 @@ again:
/*
* 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);
}
OpenPOWER on IntegriCloud