From: Martin Schwidefsky Use cputime type and operations in do_task_stat, process_ticks and thread_ticks as well. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton --- 25-akpm/fs/proc/array.c | 22 ++++++++++++---------- kernel/posix-timers.c | 0 2 files changed, 12 insertions(+), 10 deletions(-) diff -puN fs/proc/array.c~cputime-missing-pieces fs/proc/array.c --- 25/fs/proc/array.c~cputime-missing-pieces 2004-12-20 14:42:23.737006048 -0800 +++ 25-akpm/fs/proc/array.c 2004-12-20 14:42:23.742005288 -0800 @@ -315,8 +315,9 @@ static int do_task_stat(struct task_stru int num_threads = 0; struct mm_struct *mm; unsigned long long start_time; - unsigned long cmin_flt = 0, cmaj_flt = 0, cutime = 0, cstime = 0; - unsigned long min_flt = 0, maj_flt = 0, utime = 0, stime = 0; + unsigned long cmin_flt = 0, cmaj_flt = 0; + unsigned long min_flt = 0, maj_flt = 0; + cputime_t cutime, cstime, utime, stime; unsigned long rsslim = 0; struct task_struct *t; char tcomm[sizeof(task->comm)]; @@ -334,6 +335,7 @@ static int do_task_stat(struct task_stru sigemptyset(&sigign); sigemptyset(&sigcatch); + cutime = cstime = utime = stime = cputime_zero; read_lock(&tasklist_lock); if (task->sighand) { spin_lock_irq(&task->sighand->siglock); @@ -346,8 +348,8 @@ static int do_task_stat(struct task_stru do { min_flt += t->min_flt; maj_flt += t->maj_flt; - utime += t->utime; - stime += t->stime; + utime = cputime_add(utime, t->utime); + stime = cputime_add(stime, t->stime); t = next_thread(t); } while (t != task); } @@ -369,8 +371,8 @@ static int do_task_stat(struct task_stru if (whole) { min_flt += task->signal->min_flt; maj_flt += task->signal->maj_flt; - utime += task->signal->utime; - stime += task->signal->stime; + utime = cputime_add(utime, task->signal->utime); + stime = cputime_add(stime, task->signal->stime); } } ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; @@ -413,10 +415,10 @@ static int do_task_stat(struct task_stru cmin_flt, maj_flt, cmaj_flt, - jiffies_to_clock_t(utime), - jiffies_to_clock_t(stime), - jiffies_to_clock_t(cutime), - jiffies_to_clock_t(cstime), + cputime_to_clock_t(utime), + cputime_to_clock_t(stime), + cputime_to_clock_t(cutime), + cputime_to_clock_t(cstime), priority, nice, num_threads, diff -puN kernel/posix-timers.c~cputime-missing-pieces kernel/posix-timers.c _