* processing by one tick, or call the high level unnecessarily.
* The variables which are changed require more care:
* rp->p_user_time, rp->p_sys_time:
- * These are protected by explicit locks in system.c. They are
- * not properly protected in dmp.c (the increment here is not
- * atomic) but that hardly matters.
+ * These are protected by explicit locks in system.c.
* pending_ticks:
* This is protected by explicit locks in clock.c. Don't
* update realtime directly, since there are too many
rmc->mp_parent = who; /* record child's parent */
rmc->mp_flags &= (IN_USE|SEPARATE); /* inherit only these flags */
+ rmc->mp_child_utime = 0; /* reset administration */
+ rmc->mp_child_stime = 0; /* reset administration */
/* A separate I&D child keeps the parents text segment. The data and stack
* segments must refer to the new copy.
/* Do accounting: fetch usage times and accumulate at parent. */
sys_times(proc_nr, t);
- p_mp = &mproc[rmp->mp_parent]; /* process' parent */
- p_mp->mp_child_utime = t[2];
- p_mp->mp_child_stime = t[3];
+ p_mp = &mproc[rmp->mp_parent]; /* process' parent */
+ p_mp->mp_child_utime += t[0] + rmp->mp_child_utime; /* add user time */
+ p_mp->mp_child_stime += t[1] + rmp->mp_child_stime; /* add system time */
/* Tell the kernel and FS that the process is no longer runnable. */
tell_fs(EXIT, proc_nr, 0, 0); /* file system can free the proc slot */