Don't count the parent's previous timeslice in the child's resource usage
(it was counted twice). Set the start time more accurately.
This commit is contained in:
parent
54c2af254d
commit
d7e3a89f1f
@ -36,7 +36,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
* @(#)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>
|
#include <sys/param.h>
|
||||||
@ -289,9 +289,8 @@ fork1(p1, isvfork, retval)
|
|||||||
/*
|
/*
|
||||||
* Child process. Set start time and get to work.
|
* Child process. Set start time and get to work.
|
||||||
*/
|
*/
|
||||||
(void) splclock();
|
microtime(&runtime);
|
||||||
p2->p_stats->p_start = time;
|
p2->p_stats->p_start = runtime;
|
||||||
(void) spl0();
|
|
||||||
p2->p_acflag = AFORK;
|
p2->p_acflag = AFORK;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user