diff options
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 7277622..a158fd7 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -828,7 +828,9 @@ svr4_sys_times(td, uap) p = td->td_proc; PROC_LOCK(p); + PROC_SLOCK(p); calcru(p, &utime, &stime); + PROC_SUNLOCK(p); calccru(p, &cutime, &cstime); PROC_UNLOCK(p); @@ -1241,7 +1243,9 @@ loop: pid = p->p_pid; status = p->p_xstat; ru = p->p_ru; + PROC_SLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); + PROC_SUNLOCK(p); PROC_UNLOCK(p); sx_sunlock(&proctree_lock); @@ -1266,7 +1270,9 @@ loop: pid = p->p_pid; status = W_STOPCODE(p->p_xstat); ru = p->p_ru; + PROC_SLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); + PROC_SUNLOCK(p); PROC_UNLOCK(p); if (((uap->options & SVR4_WNOWAIT)) == 0) { @@ -1288,7 +1294,9 @@ loop: pid = p->p_pid; ru = p->p_ru; status = SIGCONT; + PROC_SLOCK(p); calcru(p, &ru.ru_utime, &ru.ru_stime); + PROC_SUNLOCK(p); PROC_UNLOCK(p); if (((uap->options & SVR4_WNOWAIT)) == 0) { |