X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Ftimer.h;h=daf9685b861c05143b17c529b1b72e77aa49c4ee;hb=8b805ef617cf0e02f6d18b891f8deb6246421b01;hp=de0e71359ede60eadb302df0988300c97c790e3e;hpb=75659ca0c10992dcb39258518368a0f6f56e935d;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/timer.h b/include/linux/timer.h index de0e71359ed..daf9685b861 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -4,6 +4,7 @@ #include #include #include +#include struct tvec_base; @@ -25,6 +26,7 @@ struct timer_list { extern struct tvec_base boot_tvec_bases; #define TIMER_INITIALIZER(_function, _expires, _data) { \ + .entry = { .prev = TIMER_ENTRY_STATIC }, \ .function = (_function), \ .expires = (_expires), \ .data = (_data), \ @@ -35,8 +37,19 @@ extern struct tvec_base boot_tvec_bases; struct timer_list _name = \ TIMER_INITIALIZER(_function, _expires, _data) -void fastcall init_timer(struct timer_list * timer); -void fastcall init_timer_deferrable(struct timer_list *timer); +void init_timer(struct timer_list *timer); +void init_timer_deferrable(struct timer_list *timer); + +#ifdef CONFIG_DEBUG_OBJECTS_TIMERS +extern void init_timer_on_stack(struct timer_list *timer); +extern void destroy_timer_on_stack(struct timer_list *timer); +#else +static inline void destroy_timer_on_stack(struct timer_list *timer) { } +static inline void init_timer_on_stack(struct timer_list *timer) +{ + init_timer(timer); +} +#endif static inline void setup_timer(struct timer_list * timer, void (*function)(unsigned long), @@ -47,6 +60,15 @@ static inline void setup_timer(struct timer_list * timer, init_timer(timer); } +static inline void setup_timer_on_stack(struct timer_list *timer, + void (*function)(unsigned long), + unsigned long data) +{ + timer->function = function; + timer->data = data; + init_timer_on_stack(timer); +} + /** * timer_pending - is a timer pending? * @timer: the timer in question @@ -124,8 +146,6 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) } #endif -extern void delayed_work_timer_fn(unsigned long __data); - /** * add_timer - start a timer * @timer: the timer to be added @@ -166,5 +186,9 @@ unsigned long __round_jiffies_relative(unsigned long j, int cpu); unsigned long round_jiffies(unsigned long j); unsigned long round_jiffies_relative(unsigned long j); +unsigned long __round_jiffies_up(unsigned long j, int cpu); +unsigned long __round_jiffies_up_relative(unsigned long j, int cpu); +unsigned long round_jiffies_up(unsigned long j); +unsigned long round_jiffies_up_relative(unsigned long j); #endif