1MOD_TIMER_PINNED(9) Driver Basics MOD_TIMER_PINNED(9)
2
3
4
6 mod_timer_pinned - modify a timer's timeout
7
9 int mod_timer_pinned(struct timer_list * timer, unsigned long expires);
10
12 timer
13 the timer to be modified
14
15 expires
16 new timeout in jiffies
17
19 mod_timer_pinned is a way to update the expire field of an active timer
20 (if the timer is inactive it will be activated) and to ensure that the
21 timer is scheduled on the current CPU.
22
23 Note that this does not prevent the timer from being migrated when the
24 current CPU goes offline. If this is a problem for you, use CPU-hotplug
25 notifiers to handle it correctly, for example, cancelling the timer
26 when the corresponding CPU goes offline.
27
28 mod_timer_pinned(timer, expires) is equivalent to:
29
30 del_timer(timer); timer->expires = expires; add_timer(timer);
31
33Kernel Hackers Manual 3.10 June 2019 MOD_TIMER_PINNED(9)