diff options
author | Yong Zhang <yong.zhang@windriver.com> | 2010-10-20 18:57:31 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-22 08:46:25 -0400 |
commit | 6f1bc451e6a79470b122a37ee1fc6bbca450f444 (patch) | |
tree | b4393f6130ae3a9075de509a0e0e9328f3bd3430 /include | |
parent | 20f33a03f0cf87e51165f7084f697acfb68e865b (diff) |
timer: Make try_to_del_timer_sync() the same on SMP and UP
On UP try_to_del_timer_sync() is mapped to del_timer() which does not
take the running timer callback into account, so it has different
semantics.
Remove the SMP dependency of try_to_del_timer_sync() by using
base->running_timer in the UP case as well.
[ tglx: Removed set_running_timer() inline and tweaked the changelog ]
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/timer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index cbfb7a355d30..6abd9138beda 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -274,11 +274,11 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
274 | 274 | ||
275 | extern void add_timer(struct timer_list *timer); | 275 | extern void add_timer(struct timer_list *timer); |
276 | 276 | ||
277 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
278 | |||
277 | #ifdef CONFIG_SMP | 279 | #ifdef CONFIG_SMP |
278 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
279 | extern int del_timer_sync(struct timer_list *timer); | 280 | extern int del_timer_sync(struct timer_list *timer); |
280 | #else | 281 | #else |
281 | # define try_to_del_timer_sync(t) del_timer(t) | ||
282 | # define del_timer_sync(t) del_timer(t) | 282 | # define del_timer_sync(t) del_timer(t) |
283 | #endif | 283 | #endif |
284 | 284 | ||