Implement add_timer_on() function in the LinuxKPI.

Obtained from:		kmacy @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-03-06 14:56:57 +00:00
parent aaadc41f6c
commit def277d3ef
2 changed files with 10 additions and 0 deletions

View File

@ -62,6 +62,7 @@ do { \
extern void mod_timer(struct timer_list *, unsigned long);
extern void add_timer(struct timer_list *);
extern void add_timer_on(struct timer_list *, int cpu);
#define del_timer(timer) callout_stop(&(timer)->timer_callout)
#define del_timer_sync(timer) callout_drain(&(timer)->timer_callout)

View File

@ -1023,6 +1023,15 @@ add_timer(struct timer_list *timer)
&linux_timer_callback_wrapper, timer);
}
void
add_timer_on(struct timer_list *timer, int cpu)
{
callout_reset_on(&timer->timer_callout,
linux_timer_jiffies_until(timer->expires),
&linux_timer_callback_wrapper, timer, cpu);
}
static void
linux_timer_init(void *arg)
{