lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[RFC] [PATCH 1/1]: timers: Change add_timer to use add_timer_on
From: Krishna Kumar <krkumar2@in.ibm.com>

timer: Change add_timer to not check for existing timer.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---

include/linux/timer.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff -ruNp 2.6.27-rc7-org/include/linux/timer.h 2.6.27-rc7-new/include/linux/timer.h
--- 2.6.27-rc7-org/include/linux/timer.h 2008-09-17 17:40:36.000000000 +0530
+++ 2.6.27-rc7-new/include/linux/timer.h 2008-09-17 17:41:50.000000000 +0530
@@ -4,6 +4,7 @@
#include <linux/list.h>
#include <linux/ktime.h>
#include <linux/stddef.h>
+#include <linux/smp.h>
#include <linux/debugobjects.h>

struct tvec_base;
@@ -162,8 +163,7 @@ static inline void timer_stats_timer_cle
*/
static inline void add_timer(struct timer_list *timer)
{
- BUG_ON(timer_pending(timer));
- __mod_timer(timer, timer->expires);
+ add_timer_on(timer, raw_smp_processor_id());
}

#ifdef CONFIG_SMP

\
 
 \ /
  Last update: 2008-09-22 06:37    [W:0.046 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site