From: Tomas Hruby Date: Fri, 18 Jun 2010 14:01:34 +0000 (+0000) Subject: Cycle counters zeroed after fork for the child X-Git-Tag: v3.1.8~439 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/zones/static/man.host.html?a=commitdiff_plain;h=6bc21b699274ccef38ce01a099fd4a6f2e5703d3;p=minix.git Cycle counters zeroed after fork for the child --- diff --git a/kernel/system/do_fork.c b/kernel/system/do_fork.c index 4a1180cc6..248d18f7c 100644 --- a/kernel/system/do_fork.c +++ b/kernel/system/do_fork.c @@ -15,6 +15,7 @@ #include #include +#include #if USE_FORK @@ -94,6 +95,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.