Lines Matching full:timer

9  *  In contrast to the low-resolution timeout API, aka timer wheel,
16 * Based on the original timer wheel code
42 #include <linux/timer.h>
48 #include <trace/events/timer.h>
62 * The timer bases:
65 * into the timer bases by the hrtimer_base_type enum. When trying
136 * timer->base->cpu_base
155 * means that all timers which are tied to this base via timer->base are
161 * When the timer's base is locked, and the timer removed from list, it is
162 * possible to set timer->base = &migration_base and drop the lock: the timer
166 struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, in lock_hrtimer_base() argument
168 __acquires(&timer->base->lock) in lock_hrtimer_base()
173 base = READ_ONCE(timer->base); in lock_hrtimer_base()
176 if (likely(base == timer->base)) in lock_hrtimer_base()
178 /* The timer has migrated to another CPU: */ in lock_hrtimer_base()
186 * We do not migrate the timer when it is expiring before the next
195 hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base) in hrtimer_check_target() argument
199 expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset); in hrtimer_check_target()
215 * We switch the timer base to a power-optimized selected CPU target,
218 * - timer migration is enabled
219 * - the timer callback is not running
220 * - the timer is not the first expiring timer on the new target
222 * If one of the above requirements is not fulfilled we move the timer
224 * the timer callback is currently running.
227 switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, in switch_hrtimer_base() argument
241 * We are trying to move timer to new_base. in switch_hrtimer_base()
242 * However we can't change timer's base while it is running, in switch_hrtimer_base()
245 * code will take care of this when the timer function has in switch_hrtimer_base()
247 * the timer is enqueued. in switch_hrtimer_base()
249 if (unlikely(hrtimer_callback_running(timer))) in switch_hrtimer_base()
253 WRITE_ONCE(timer->base, &migration_base); in switch_hrtimer_base()
258 hrtimer_check_target(timer, new_base)) { in switch_hrtimer_base()
262 WRITE_ONCE(timer->base, base); in switch_hrtimer_base()
265 WRITE_ONCE(timer->base, new_base); in switch_hrtimer_base()
268 hrtimer_check_target(timer, new_base)) { in switch_hrtimer_base()
284 lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) in lock_hrtimer_base() argument
285 __acquires(&timer->base->cpu_base->lock) in lock_hrtimer_base()
287 struct hrtimer_clock_base *base = timer->base; in lock_hrtimer_base()
361 struct hrtimer *timer = addr; in hrtimer_fixup_init() local
365 hrtimer_cancel(timer); in hrtimer_fixup_init()
366 debug_object_init(timer, &hrtimer_debug_descr); in hrtimer_fixup_init()
395 struct hrtimer *timer = addr; in hrtimer_fixup_free() local
399 hrtimer_cancel(timer); in hrtimer_fixup_free()
400 debug_object_free(timer, &hrtimer_debug_descr); in hrtimer_fixup_free()
415 static inline void debug_hrtimer_init(struct hrtimer *timer) in debug_hrtimer_init() argument
417 debug_object_init(timer, &hrtimer_debug_descr); in debug_hrtimer_init()
420 static inline void debug_hrtimer_activate(struct hrtimer *timer, in debug_hrtimer_activate() argument
423 debug_object_activate(timer, &hrtimer_debug_descr); in debug_hrtimer_activate()
426 static inline void debug_hrtimer_deactivate(struct hrtimer *timer) in debug_hrtimer_deactivate() argument
428 debug_object_deactivate(timer, &hrtimer_debug_descr); in debug_hrtimer_deactivate()
431 static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
434 void hrtimer_init_on_stack(struct hrtimer *timer, clockid_t clock_id, in hrtimer_init_on_stack() argument
437 debug_object_init_on_stack(timer, &hrtimer_debug_descr); in hrtimer_init_on_stack()
438 __hrtimer_init(timer, clock_id, mode); in hrtimer_init_on_stack()
448 debug_object_init_on_stack(&sl->timer, &hrtimer_debug_descr); in hrtimer_init_sleeper_on_stack()
453 void destroy_hrtimer_on_stack(struct hrtimer *timer) in destroy_hrtimer_on_stack() argument
455 debug_object_free(timer, &hrtimer_debug_descr); in destroy_hrtimer_on_stack()
461 static inline void debug_hrtimer_init(struct hrtimer *timer) { } in debug_hrtimer_init() argument
462 static inline void debug_hrtimer_activate(struct hrtimer *timer, in debug_hrtimer_activate() argument
464 static inline void debug_hrtimer_deactivate(struct hrtimer *timer) { } in debug_hrtimer_deactivate() argument
468 debug_init(struct hrtimer *timer, clockid_t clockid, in debug_init() argument
471 debug_hrtimer_init(timer); in debug_init()
472 trace_hrtimer_init(timer, clockid, mode); in debug_init()
475 static inline void debug_activate(struct hrtimer *timer, in debug_activate() argument
478 debug_hrtimer_activate(timer, mode); in debug_activate()
479 trace_hrtimer_start(timer, mode); in debug_activate()
482 static inline void debug_deactivate(struct hrtimer *timer) in debug_deactivate() argument
484 debug_hrtimer_deactivate(timer); in debug_deactivate()
485 trace_hrtimer_cancel(timer); in debug_deactivate()
515 struct hrtimer *timer; in __hrtimer_next_event_base() local
518 timer = container_of(next, struct hrtimer, node); in __hrtimer_next_event_base()
519 if (timer == exclude) { in __hrtimer_next_event_base()
520 /* Get to the next timer in the queue. */ in __hrtimer_next_event_base()
525 timer = container_of(next, struct hrtimer, node); in __hrtimer_next_event_base()
527 expires = ktime_sub(hrtimer_get_expires(timer), base->offset); in __hrtimer_next_event_base()
531 /* Skip cpu_base update if a timer is being excluded. */ in __hrtimer_next_event_base()
535 if (timer->is_soft) in __hrtimer_next_event_base()
536 cpu_base->softirq_next_timer = timer; in __hrtimer_next_event_base()
538 cpu_base->next_timer = timer; in __hrtimer_next_event_base()
617 * If a softirq timer is expiring first, update cpu_base->next_timer in hrtimer_update_next_event()
663 * If a hang was detected in the last timer interrupt then we in __hrtimer_reprogram()
700 /* High resolution timer related functions */
704 * High resolution timer enabled ?
778 * If high resolution mode is active then the next expiring timer in retrigger_next_event()
783 * of the next expiring timer is enough. The return from the SMP in retrigger_next_event()
800 * When a timer is enqueued and expires earlier than the already enqueued
801 * timers, we have to check, whether it expires earlier than the timer for
806 static void hrtimer_reprogram(struct hrtimer *timer, bool reprogram) in hrtimer_reprogram() argument
809 struct hrtimer_clock_base *base = timer->base; in hrtimer_reprogram()
810 ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset); in hrtimer_reprogram()
812 WARN_ON_ONCE(hrtimer_get_expires_tv64(timer) < 0); in hrtimer_reprogram()
815 * CLOCK_REALTIME timer might be requested with an absolute in hrtimer_reprogram()
821 if (timer->is_soft) { in hrtimer_reprogram()
837 timer_cpu_base->softirq_next_timer = timer; in hrtimer_reprogram()
846 * If the timer is not on the current cpu, we cannot reprogram in hrtimer_reprogram()
862 cpu_base->next_timer = timer; in hrtimer_reprogram()
864 __hrtimer_reprogram(cpu_base, timer, expires); in hrtimer_reprogram()
882 * the next expiring timer. in update_needs_ipi()
896 * will reevaluate the first expiring timer of all clock bases in update_needs_ipi()
904 * timer in a clock base is moving ahead of the first expiring timer of in update_needs_ipi()
936 * when the change moves an affected timer ahead of the first expiring
937 * timer on that CPU. Obviously remote per CPU clock event devices cannot
1013 void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) in unlock_hrtimer_base() argument
1014 __releases(&timer->base->cpu_base->lock) in unlock_hrtimer_base()
1016 raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags); in unlock_hrtimer_base()
1020 * hrtimer_forward() - forward the timer expiry
1021 * @timer: hrtimer to forward
1025 * Forward the timer expiry so it will expire in the future.
1028 * This only updates the timer expiry value and does not requeue the timer.
1032 * Context: Can be safely called from the callback function of @timer. If called
1033 * from other contexts @timer must neither be enqueued nor running the
1038 u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) in hrtimer_forward() argument
1043 delta = ktime_sub(now, hrtimer_get_expires(timer)); in hrtimer_forward()
1048 if (WARN_ON(timer->state & HRTIMER_STATE_ENQUEUED)) in hrtimer_forward()
1058 hrtimer_add_expires_ns(timer, incr * orun); in hrtimer_forward()
1059 if (hrtimer_get_expires_tv64(timer) > now) in hrtimer_forward()
1067 hrtimer_add_expires(timer, interval); in hrtimer_forward()
1074 * enqueue_hrtimer - internal function to (re)start a timer
1076 * The timer is inserted in expiry order. Insertion into the
1079 * Returns 1 when the new timer is the leftmost timer in the tree.
1081 static int enqueue_hrtimer(struct hrtimer *timer, in enqueue_hrtimer() argument
1085 debug_activate(timer, mode); in enqueue_hrtimer()
1091 WRITE_ONCE(timer->state, HRTIMER_STATE_ENQUEUED); in enqueue_hrtimer()
1093 return timerqueue_add(&base->active, &timer->node); in enqueue_hrtimer()
1097 * __remove_hrtimer - internal function to remove a timer
1101 * High resolution timer mode reprograms the clock event device when the
1102 * timer is the one which expires next. The caller can disable this by setting
1104 * anyway (e.g. timer interrupt)
1106 static void __remove_hrtimer(struct hrtimer *timer, in __remove_hrtimer() argument
1111 u8 state = timer->state; in __remove_hrtimer()
1114 WRITE_ONCE(timer->state, newstate); in __remove_hrtimer()
1118 if (!timerqueue_del(&base->active, &timer->node)) in __remove_hrtimer()
1124 * timer on a remote cpu. No harm as we never dereference in __remove_hrtimer()
1127 * remote cpu later on if the same timer gets enqueued again. in __remove_hrtimer()
1129 if (reprogram && timer == cpu_base->next_timer) in __remove_hrtimer()
1137 remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, in remove_hrtimer() argument
1140 u8 state = timer->state; in remove_hrtimer()
1146 * Remove the timer and force reprogramming when high in remove_hrtimer()
1147 * resolution mode is active and the timer is on the current in remove_hrtimer()
1148 * CPU. If we remove a timer on another CPU, reprogramming is in remove_hrtimer()
1153 debug_deactivate(timer); in remove_hrtimer()
1157 * If the timer is not restarted then reprogramming is in remove_hrtimer()
1158 * required if the timer is local. If it is local and about in remove_hrtimer()
1167 __remove_hrtimer(timer, base, state, reprogram); in remove_hrtimer()
1173 static inline ktime_t hrtimer_update_lowres(struct hrtimer *timer, ktime_t tim, in hrtimer_update_lowres() argument
1182 timer->is_rel = mode & HRTIMER_MODE_REL; in hrtimer_update_lowres()
1183 if (timer->is_rel) in hrtimer_update_lowres()
1214 static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, in __hrtimer_start_range_ns() argument
1222 * If the timer is on the local cpu base and is the first expiring in __hrtimer_start_range_ns()
1223 * timer then this might end up reprogramming the hardware twice in __hrtimer_start_range_ns()
1225 * reprogram on removal, keep the timer local to the current CPU in __hrtimer_start_range_ns()
1227 * it is the new first expiring timer again or not. in __hrtimer_start_range_ns()
1230 force_local &= base->cpu_base->next_timer == timer; in __hrtimer_start_range_ns()
1233 * Remove an active timer from the queue. In case it is not queued in __hrtimer_start_range_ns()
1237 * If it's on the current CPU and the first expiring timer, then in __hrtimer_start_range_ns()
1238 * skip reprogramming, keep the timer local and enforce in __hrtimer_start_range_ns()
1239 * reprogramming later if it was the first expiring timer. This in __hrtimer_start_range_ns()
1243 remove_hrtimer(timer, base, true, force_local); in __hrtimer_start_range_ns()
1248 tim = hrtimer_update_lowres(timer, tim, mode); in __hrtimer_start_range_ns()
1250 hrtimer_set_expires_range_ns(timer, tim, delta_ns); in __hrtimer_start_range_ns()
1252 /* Switch the timer base, if necessary: */ in __hrtimer_start_range_ns()
1254 new_base = switch_hrtimer_base(timer, base, in __hrtimer_start_range_ns()
1260 first = enqueue_hrtimer(timer, new_base, mode); in __hrtimer_start_range_ns()
1265 * Timer was forced to stay on the current CPU to avoid in __hrtimer_start_range_ns()
1267 * hardware by evaluating the new first expiring timer. in __hrtimer_start_range_ns()
1275 * @timer: the timer to be added
1277 * @delta_ns: "slack" range for the timer
1278 * @mode: timer mode: absolute (HRTIMER_MODE_ABS) or
1282 void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, in hrtimer_start_range_ns() argument
1288 if (WARN_ON_ONCE(!timer->function)) in hrtimer_start_range_ns()
1296 WARN_ON_ONCE(!(mode & HRTIMER_MODE_SOFT) ^ !timer->is_soft); in hrtimer_start_range_ns()
1298 WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard); in hrtimer_start_range_ns()
1300 base = lock_hrtimer_base(timer, &flags); in hrtimer_start_range_ns()
1302 if (__hrtimer_start_range_ns(timer, tim, delta_ns, mode, base)) in hrtimer_start_range_ns()
1303 hrtimer_reprogram(timer, true); in hrtimer_start_range_ns()
1305 unlock_hrtimer_base(timer, &flags); in hrtimer_start_range_ns()
1310 * hrtimer_try_to_cancel - try to deactivate a timer
1311 * @timer: hrtimer to stop
1315 * * 0 when the timer was not active
1316 * * 1 when the timer was active
1317 * * -1 when the timer is currently executing the callback function and
1320 int hrtimer_try_to_cancel(struct hrtimer *timer) in hrtimer_try_to_cancel() argument
1327 * Check lockless first. If the timer is not active (neither in hrtimer_try_to_cancel()
1332 if (!hrtimer_active(timer)) in hrtimer_try_to_cancel()
1335 base = lock_hrtimer_base(timer, &flags); in hrtimer_try_to_cancel()
1337 if (!hrtimer_callback_running(timer)) in hrtimer_try_to_cancel()
1338 ret = remove_hrtimer(timer, base, false, false); in hrtimer_try_to_cancel()
1340 unlock_hrtimer_base(timer, &flags); in hrtimer_try_to_cancel()
1369 * the timer callback to finish. Drop expiry_lock and reacquire it. That
1385 * deletion of a timer failed because the timer callback function was
1389 * in the middle of a timer callback, then calling del_timer_sync() can
1392 * - If the caller is on a remote CPU then it has to spin wait for the timer
1395 * - If the caller originates from the task which preempted the timer
1396 * handler on the same CPU, then spin waiting for the timer handler to
1399 void hrtimer_cancel_wait_running(const struct hrtimer *timer) in hrtimer_cancel_wait_running() argument
1402 struct hrtimer_clock_base *base = READ_ONCE(timer->base); in hrtimer_cancel_wait_running()
1405 * Just relax if the timer expires in hard interrupt context or if in hrtimer_cancel_wait_running()
1408 if (!timer->is_soft || is_migration_base(base)) { in hrtimer_cancel_wait_running()
1415 * held by the softirq across the timer callback. Drop the lock in hrtimer_cancel_wait_running()
1416 * immediately so the softirq can expire the next timer. In theory in hrtimer_cancel_wait_running()
1417 * the timer could already be running again, but that's more than in hrtimer_cancel_wait_running()
1437 * hrtimer_cancel - cancel a timer and wait for the handler to finish.
1438 * @timer: the timer to be cancelled
1441 * 0 when the timer was not active
1442 * 1 when the timer was active
1444 int hrtimer_cancel(struct hrtimer *timer) in hrtimer_cancel() argument
1449 ret = hrtimer_try_to_cancel(timer); in hrtimer_cancel()
1452 hrtimer_cancel_wait_running(timer); in hrtimer_cancel()
1459 * __hrtimer_get_remaining - get remaining time for the timer
1460 * @timer: the timer to read
1463 ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust) in __hrtimer_get_remaining() argument
1468 lock_hrtimer_base(timer, &flags); in __hrtimer_get_remaining()
1470 rem = hrtimer_expires_remaining_adjusted(timer); in __hrtimer_get_remaining()
1472 rem = hrtimer_expires_remaining(timer); in __hrtimer_get_remaining()
1473 unlock_hrtimer_base(timer, &flags); in __hrtimer_get_remaining()
1483 * Returns the next expiry time or KTIME_MAX if no timer is pending.
1502 * hrtimer_next_event_without - time until next expiry event w/o one timer
1503 * @exclude: timer to exclude
1547 static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, in __hrtimer_init() argument
1563 memset(timer, 0, sizeof(struct hrtimer)); in __hrtimer_init()
1577 timer->is_soft = softtimer; in __hrtimer_init()
1578 timer->is_hard = !!(mode & HRTIMER_MODE_HARD); in __hrtimer_init()
1579 timer->base = &cpu_base->clock_base[base]; in __hrtimer_init()
1580 timerqueue_init(&timer->node); in __hrtimer_init()
1584 * hrtimer_init - initialize a timer to the given clock
1585 * @timer: the timer to be initialized
1595 void hrtimer_init(struct hrtimer *timer, clockid_t clock_id, in hrtimer_init() argument
1598 debug_init(timer, clock_id, mode); in hrtimer_init()
1599 __hrtimer_init(timer, clock_id, mode); in hrtimer_init()
1604 * A timer is active, when it is enqueued into the rbtree or the
1610 bool hrtimer_active(const struct hrtimer *timer) in hrtimer_active() argument
1616 base = READ_ONCE(timer->base); in hrtimer_active()
1619 if (timer->state != HRTIMER_STATE_INACTIVE || in hrtimer_active()
1620 base->running == timer) in hrtimer_active()
1624 base != READ_ONCE(timer->base)); in hrtimer_active()
1634 * - queued: the timer is queued
1635 * - callback: the timer is being ran
1636 * - post: the timer is inactive or (re)queued
1638 * On the read side we ensure we observe timer->state and cpu_base->running
1640 * This includes timer->base changing because sequence numbers alone are
1650 struct hrtimer *timer, ktime_t *now, in __run_hrtimer() argument
1659 debug_deactivate(timer); in __run_hrtimer()
1660 base->running = timer; in __run_hrtimer()
1667 * timer->state == INACTIVE. in __run_hrtimer()
1671 __remove_hrtimer(timer, base, HRTIMER_STATE_INACTIVE, 0); in __run_hrtimer()
1672 fn = timer->function; in __run_hrtimer()
1676 * timer is restarted with a period then it becomes an absolute in __run_hrtimer()
1677 * timer. If its not restarted it does not matter. in __run_hrtimer()
1680 timer->is_rel = false; in __run_hrtimer()
1683 * The timer is marked as running in the CPU base, so it is in __run_hrtimer()
1688 trace_hrtimer_expire_entry(timer, now); in __run_hrtimer()
1689 expires_in_hardirq = lockdep_hrtimer_enter(timer); in __run_hrtimer()
1691 restart = fn(timer); in __run_hrtimer()
1694 trace_hrtimer_expire_exit(timer); in __run_hrtimer()
1703 * hrtimer_start_range_ns() can have popped in and enqueued the timer in __run_hrtimer()
1707 !(timer->state & HRTIMER_STATE_ENQUEUED)) in __run_hrtimer()
1708 enqueue_hrtimer(timer, base, HRTIMER_MODE_ABS); in __run_hrtimer()
1714 * hrtimer_active() cannot observe base->running.timer == NULL && in __run_hrtimer()
1715 * timer->state == INACTIVE. in __run_hrtimer()
1719 WARN_ON_ONCE(base->running != timer); in __run_hrtimer()
1736 struct hrtimer *timer; in __hrtimer_run_queues() local
1738 timer = container_of(node, struct hrtimer, node); in __hrtimer_run_queues()
1749 * are right-of a not yet expired timer, because that in __hrtimer_run_queues()
1750 * timer will have to trigger a wakeup anyway. in __hrtimer_run_queues()
1752 if (basenow < hrtimer_get_softexpires_tv64(timer)) in __hrtimer_run_queues()
1755 __run_hrtimer(cpu_base, base, timer, &basenow, flags); in __hrtimer_run_queues()
1784 * High resolution timer interrupt
1804 * held to prevent that a timer is enqueued in our queue via in hrtimer_interrupt()
1836 * The next timer was already expired due to: in hrtimer_interrupt()
1919 static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer) in hrtimer_wakeup() argument
1922 container_of(timer, struct hrtimer_sleeper, timer); in hrtimer_wakeup()
1933 * hrtimer_sleeper_start_expires - Start a hrtimer sleeper timer
1935 * @mode: timer mode abs/rel
1950 if (IS_ENABLED(CONFIG_PREEMPT_RT) && sl->timer.is_hard) in hrtimer_sleeper_start_expires()
1953 hrtimer_start_expires(&sl->timer, mode); in hrtimer_sleeper_start_expires()
1984 __hrtimer_init(&sl->timer, clock_id, mode); in __hrtimer_init_sleeper()
1985 sl->timer.function = hrtimer_wakeup; in __hrtimer_init_sleeper()
1993 * @mode: timer mode abs/rel
1998 debug_init(&sl->timer, clock_id, mode); in hrtimer_init_sleeper()
2034 hrtimer_cancel(&t->timer); in do_nanosleep()
2046 ktime_t rem = hrtimer_expires_remaining(&t->timer); in do_nanosleep()
2065 hrtimer_set_expires_tv64(&t.timer, restart->nanosleep.expires); in hrtimer_nanosleep_restart()
2067 destroy_hrtimer_on_stack(&t.timer); in hrtimer_nanosleep_restart()
2079 hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns); in hrtimer_nanosleep()
2091 restart->nanosleep.clockid = t.timer.base->clockid; in hrtimer_nanosleep()
2092 restart->nanosleep.expires = hrtimer_get_expires_tv64(&t.timer); in hrtimer_nanosleep()
2095 destroy_hrtimer_on_stack(&t.timer); in hrtimer_nanosleep()
2176 struct hrtimer *timer; in migrate_hrtimer_list() local
2180 timer = container_of(node, struct hrtimer, node); in migrate_hrtimer_list()
2181 BUG_ON(hrtimer_callback_running(timer)); in migrate_hrtimer_list()
2182 debug_deactivate(timer); in migrate_hrtimer_list()
2186 * timer could be seen as !active and just vanish away in migrate_hrtimer_list()
2189 __remove_hrtimer(timer, old_base, HRTIMER_STATE_ENQUEUED, 0); in migrate_hrtimer_list()
2190 timer->base = new_base; in migrate_hrtimer_list()
2193 * reprogram the event device in case the timer in migrate_hrtimer_list()
2199 enqueue_hrtimer(timer, new_base, HRTIMER_MODE_ABS); in migrate_hrtimer_list()
2225 * timer on this CPU. Update it. in hrtimers_cpu_dying()
2250 * @mode: timer mode
2251 * @clock_id: timer clock to be used
2277 hrtimer_set_expires_range_ns(&t.timer, *expires, delta); in schedule_hrtimeout_range_clock()
2283 hrtimer_cancel(&t.timer); in schedule_hrtimeout_range_clock()
2284 destroy_hrtimer_on_stack(&t.timer); in schedule_hrtimeout_range_clock()
2296 * @mode: timer mode
2306 * but may decide to fire the timer earlier, but no earlier than @expires.
2321 * Returns 0 when the timer has expired. If the task was woken before the
2322 * timer expired by a signal (only possible in state TASK_INTERRUPTIBLE) or
2336 * @mode: timer mode
2355 * Returns 0 when the timer has expired. If the task was woken before the
2356 * timer expired by a signal (only possible in state TASK_INTERRUPTIBLE) or