alarm_cancel(9)
π alarm_cancel(9) β the Kernel API Manual page, bestie edition β¨
okay so real talk, this is a page from the Kernel API Manual, and it's about alarm_cancel β the little function that spins trying to cancel an alarm timer until the whole thing is actually done. no half measures, no "eh close enough", it literally keeps going until it's finished. main character energy honestly π
β¨ NAME β¨
alarm_cancel β spins trying to cancel an alarm timer until it is done π
like, it does not give up. it stays there. committed. obsessed. until it's actually done.
πΈ SYNOPSIS πΈ
int alarm_cancel (struct alarm *alarm );
yep that's the whole thing. one function, one arg, returns an int. slay. β¨
π¦ ARGUMENTS π¦
alarmβ a ptr to the alarm you want canceled π― like, hand it over and it's gonna get canceled (or at least, it will try β see below, iykyk).
π DESCRIPTION π
okay so here's the tea:
it returns 1 if the timer was canceled, and 0 if it was not active. that's it. that's the whole vibe check. π
so like β 1 = we got it, canceled, done, periodt. 0 = nothing was happening there in the first place, no timer was active, so there was literally nothing to cancel. no drama. π
π SEE ALSO π
- the kernel file
./kernel/time/alarmtimer.cβ that's where all this lives, go look π 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)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_wait_running(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)
ngl the_try_to_cancelone right there in the list is different from this one β this page isalarm_cancel, which spins until it's done. don't mix them up bestie π the names are giving similar but they are Not The Same.
that's the whole page fr fr π«Ά it lives under ./kernel/time, dated October 2026, and this little cutie was brought to you by the Kernel API Manual. go cancel some alarms, you icon. πβπ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms