From: Ben Gras Date: Tue, 22 Jun 2010 23:24:11 +0000 (+0000) Subject: Cycle counters zeroed after fork for the child X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=6b940e1a03ca8146538b0a96ed8c248e3aa0057a;p=minix.git Cycle counters zeroed after fork for the child (r7365 from trunk) --- diff --git a/kernel/system/do_fork.c b/kernel/system/do_fork.c index 11629afb9..46adb34bd 100644 --- a/kernel/system/do_fork.c +++ b/kernel/system/do_fork.c @@ -15,6 +15,7 @@ #include #include +#include #if USE_FORK @@ -89,6 +90,9 @@ PUBLIC int do_fork(struct proc * caller, message * m_ptr) if (rpc->p_scheduler) RTS_SET(rpc, RTS_NO_QUANTUM); + make_zero64(rpc->p_cpu_time_left); + make_zero64(rpc->p_cycles); + /* If the parent is a privileged process, take away the privileges from the * child process and inhibit it from running by setting the NO_PRIV flag. * The caller should explicitely set the new privileges before executing.