diff options
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index bff9a2c5ef7..1c9a522ba14 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.174 2019/05/13 19:21:31 bluhm Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.175 2019/05/31 19:51:09 mpi Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -284,7 +284,7 @@ exit1(struct proc *p, int rv, int flags) /* add thread's accumulated rusage into the process's total */ ruadd(rup, &p->p_ru); - tuagg(pr, p); + tuagg(p, NULL); /* * clear %cpu usage during swap @@ -296,7 +296,9 @@ exit1(struct proc *p, int rv, int flags) * Final thread has died, so add on our children's rusage * and calculate the total times */ + mtx_enter(&pr->ps_mtx); calcru(&pr->ps_tu, &rup->ru_utime, &rup->ru_stime, NULL); + mtx_leave(&pr->ps_mtx); ruadd(rup, &pr->ps_cru); /* notify interested parties of our demise and clean up */ |
