From f9fc1633c7327e38d44e2303034d88eda325717b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 1 Jul 2002 00:41:38 -0700 Subject: Make in-kernel HZ be 1000 on x86, retaining user-level 100 HZ clock_t. Stop using "struct tms" internally - always use timer ticks (or one of the sane timeval/timespec types) instead. Explicitly convert to clock_t when copying to user space for the old broken interfaces that still use "clock_t". Clean up and unify jiffies<->timeval conversion. --- fs/proc/array.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'fs/proc/array.c') diff --git a/fs/proc/array.c b/fs/proc/array.c index ff74e5098ea7..c688bd7997a7 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -71,6 +71,7 @@ #include #include #include +#include #include #include @@ -360,10 +361,10 @@ int proc_pid_stat(struct task_struct *task, char * buffer) task->cmin_flt, task->maj_flt, task->cmaj_flt, - task->times.tms_utime, - task->times.tms_stime, - task->times.tms_cutime, - task->times.tms_cstime, + jiffies_to_clock_t(task->utime), + jiffies_to_clock_t(task->stime), + jiffies_to_clock_t(task->cutime), + jiffies_to_clock_t(task->cstime), priority, nice, 0UL /* removed */, @@ -692,8 +693,8 @@ int proc_pid_cpu(struct task_struct *task, char * buffer) len = sprintf(buffer, "cpu %lu %lu\n", - task->times.tms_utime, - task->times.tms_stime); + task->utime, + task->stime); for (i = 0 ; i < NR_CPUS; i++) { if (cpu_online(i)) -- cgit v1.2.3