diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-01 00:41:38 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-01 00:41:38 -0700 |
| commit | f9fc1633c7327e38d44e2303034d88eda325717b (patch) | |
| tree | f7c021d35baab8e633af5104879549bdd81c0338 /fs/proc/array.c | |
| parent | e48f3a586ab5b4262fd37c9cb1c21773549b0fb5 (diff) | |
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.
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 13 |
1 files changed, 7 insertions, 6 deletions
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 <linux/signal.h> #include <linux/highmem.h> #include <linux/file.h> +#include <linux/times.h> #include <asm/uaccess.h> #include <asm/pgtable.h> @@ -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)) |
