alarm_timer_wait_running(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… alarm_timer_wait_running(9)

okay so this is a page straight out of the Kernel API Manual, and bestie, it's a short one but it's lowkey important β€” it's about waiting for a timer callback to finish its little moment. let's get into it ✨


🌸 NAME 🌸

alarm_timer_wait_running β€” the Posix timer callback that waits for a timer πŸŽ€


✨ SYNOPSIS ✨

void alarm_timer_wait_running (struct k_itimer *timr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • timr β€” a pointer to the posixtimer data struct. that's the whole vibe, that's the argument, periodt πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so picture this: the core code is cancelling a timer, and it detects that the callback is currently running β€” main character behavior, honestly. when that happens, this function gets called. πŸ”₯

here's the tea: timr is unlocked, and the rcu read lock is held, and the whole point of that is to prevent it from being freed. no cap, that's the entire safety mechanism. 🫢


🧚 SEE ALSO 🧚

all the besties in the same family πŸ’– β€” found in the kernel file ./kernel/time/alarmtimer.c:

struct alarm_base(9), alarmtimer_get_rtcdev(9), alarmtimer_enqueue(9), alarmtimer_dequeue(9), alarmtimer_fired(9), alarmtimer_suspend(9), alarm_init(9), alarm_start_timer(9), alarm_try_to_cancel(9), alarm_cancel(9), clock2alarm(9), alarm_handle_timer(9), alarm_timer_rearm(9), alarm_timer_forward(9), alarm_timer_remaining(9), alarm_timer_try_to_cancel(9), alarm_timer_arm(9), alarm_clock_getres(9), alarm_clock_get_timespec(9), alarm_clock_get_ktime(9), alarm_timer_create(9), alarmtimer_nsleep_wakeup(9), alarmtimer_do_nsleep(9), alarm_timer_nsleep_restart(9), alarm_timer_nsleep(9), alarmtimer_init(9)


and that's the whole thing, bestie β€” short, sweet, and doing exactly one job 🌈

source: ./kernel/time Β· version: Kernel API Manual Β· October 2026 β€” mwah, see u in the next manpage πŸ’‹πŸŽ€

πŸ“¦ where this page comes from