diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-02-11 13:30:27 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 16:04:21 +0300 |
commit | 4da94d49b2ecb0a26e716a8811c3ecc542c2a65d (patch) | |
tree | a87980822b2499021f080c2b0235f441b30413cc /include/linux | |
parent | 3fccfd67df79c6351a156eb25a7a514e5f39c4d9 (diff) | |
download | linux-4da94d49b2ecb0a26e716a8811c3ecc542c2a65d.tar.xz |
timers: fix TIMER_ABSTIME for process wide cpu timers
The POSIX timer interface allows for absolute time expiry values through the
TIMER_ABSTIME flag, therefore we have to synchronize the timer to the clock
every time we start it.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5d10fa0b6002..8981e52c714f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2201,18 +2201,7 @@ static inline int spin_needbreak(spinlock_t *lock) * Thread group CPU time accounting. */ void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); - -static inline -void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times) -{ - struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; - unsigned long flags; - - spin_lock_irqsave(&cputimer->lock, flags); - cputimer->running = 1; - *times = cputimer->cputime; - spin_unlock_irqrestore(&cputimer->lock, flags); -} +void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); static inline void thread_group_cputime_init(struct signal_struct *sig) { |