aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-01-03 15:40:37 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-04 08:04:00 -0500
commit8916edef5888c5d8fe283714416a9ca95b4c3431 (patch)
tree5a46ef3616ce5cc869c6ba39e342cd71b390f313 /kernel/sys.c
parent0a582440ff546e2c6610d1acec325e91b4efd313 (diff)
getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
Impact: task stats regression fix Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and ru_stime. But commit "f06febc: timers: fix itimer/many thread hang" broke it. this patch restores it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index d356d79e84ac..61dbfd4a54df 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1627,6 +1627,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
1627 utime = stime = cputime_zero; 1627 utime = stime = cputime_zero;
1628 1628
1629 if (who == RUSAGE_THREAD) { 1629 if (who == RUSAGE_THREAD) {
1630 utime = task_utime(current);
1631 stime = task_stime(current);
1630 accumulate_thread_rusage(p, r); 1632 accumulate_thread_rusage(p, r);
1631 goto out; 1633 goto out;
1632 } 1634 }