diff options
-rw-r--r-- | sys/kern/tty.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 90b7c7a7accf..95b092b8fffe 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2536,6 +2536,7 @@ ttyinfo(struct tty *tp) int load, pctcpu; pid_t pid; char comm[MAXCOMLEN + 1]; + struct rusage ru; if (ttycheckoutq(tp,0) == 0) return; @@ -2615,9 +2616,7 @@ ttyinfo(struct tty *tp) PROC_SUNLOCK(pick); PROC_LOCK(pick); PGRP_UNLOCK(tp->t_pgrp); - PROC_SLOCK(pick); - calcru(pick, &utime, &stime); - PROC_SUNLOCK(pick); + rufetchcalc(pick, &ru, &utime, &stime); pid = pick->p_pid; bcopy(pick->p_comm, comm, sizeof(comm)); PROC_UNLOCK(pick); |