Cycle counters zeroed after fork for the child
This commit is contained in:
parent
11193f5fa4
commit
6bc21b6992
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <minix/endpoint.h>
|
#include <minix/endpoint.h>
|
||||||
|
#include <minix/u64.h>
|
||||||
|
|
||||||
#if USE_FORK
|
#if USE_FORK
|
||||||
|
|
||||||
|
@ -94,6 +95,9 @@ PUBLIC int do_fork(struct proc * caller, message * m_ptr)
|
||||||
if (rpc->p_scheduler)
|
if (rpc->p_scheduler)
|
||||||
RTS_SET(rpc, RTS_NO_QUANTUM);
|
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
|
/* 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.
|
* child process and inhibit it from running by setting the NO_PRIV flag.
|
||||||
* The caller should explicitely set the new privileges before executing.
|
* The caller should explicitely set the new privileges before executing.
|
||||||
|
|
Loading…
Reference in a new issue