diff options
| author | Paul Mackerras <paulus@samba.org> | 2008-05-09 06:12:06 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-05-09 06:12:06 -0400 |
| commit | 2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92 (patch) | |
| tree | b2306840f227972a7c9d4a2b75e516fe81358ce8 /kernel/posix-cpu-timers.c | |
| parent | 02539d71fa98d5737bb668b02286c76241e4bac9 (diff) | |
| parent | 78be76476a34a77f0ea9db2f78ba46a2b0fd5ab5 (diff) | |
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge
Diffstat (limited to 'kernel/posix-cpu-timers.c')
| -rw-r--r-- | kernel/posix-cpu-timers.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index ae5c6c147c4b..f1525ad06cb3 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
| @@ -4,8 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | #include <linux/posix-timers.h> | 6 | #include <linux/posix-timers.h> |
| 7 | #include <asm/uaccess.h> | ||
| 8 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
| 8 | #include <linux/math64.h> | ||
| 9 | #include <asm/uaccess.h> | ||
| 9 | 10 | ||
| 10 | static int check_clock(const clockid_t which_clock) | 11 | static int check_clock(const clockid_t which_clock) |
| 11 | { | 12 | { |
| @@ -47,12 +48,10 @@ static void sample_to_timespec(const clockid_t which_clock, | |||
| 47 | union cpu_time_count cpu, | 48 | union cpu_time_count cpu, |
| 48 | struct timespec *tp) | 49 | struct timespec *tp) |
| 49 | { | 50 | { |
| 50 | if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) { | 51 | if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) |
| 51 | tp->tv_sec = div_long_long_rem(cpu.sched, | 52 | *tp = ns_to_timespec(cpu.sched); |
| 52 | NSEC_PER_SEC, &tp->tv_nsec); | 53 | else |
| 53 | } else { | ||
| 54 | cputime_to_timespec(cpu.cpu, tp); | 54 | cputime_to_timespec(cpu.cpu, tp); |
| 55 | } | ||
| 56 | } | 55 | } |
| 57 | 56 | ||
| 58 | static inline int cpu_time_before(const clockid_t which_clock, | 57 | static inline int cpu_time_before(const clockid_t which_clock, |
