hrtimer_setup_on_stack(9)
π hrtimer_setup_on_stack β kernel API manual, bestie edition β¨
okay so this page is hrtimer_setup_on_stack(9) from the Kernel API Manual β yes the manual name is literally part of the header, we're folding it in here so it still counts π
β¨ NAME β¨
hrtimer_setup_on_stack β initialize a timer on stack memory π«Ά
πΈ SYNOPSIS πΈ
void hrtimer_setup_on_stack (struct hrtimer *timer , enum
hrtimer_restart (*function)(struct hrtimer *) , clockid_t clock_id ,
enum hrtimer_mode mode );
π ARGUMENTS π
timerβ the timer to be initialized, the main character of this whole operation πfunctionβ the callback function, aka the thing that actually runs when the timer goes offclock_idβ the clock to be used β°modeβ the timer mode
π¦ DESCRIPTION π¦
So it's basically hrtimer_setup, literally the same vibe β except π you must use this one if your struct hrtimer lives in stack memory. Like, that's the whole point. Stack-allocated timer? This function. Not the other one. Noted, bestie. no cap.
π SEE ALSO π
Kernel file ./kernel/time/hrtimer.c plus the whole friend group:
hrtimer_update_function(9)hrtimer_forward(9)hrtimer_start_range_ns(9)hrtimer_start_range_ns_user(9)hrtimer_try_to_cancel(9)hrtimer_cancel(9)__hrtimer_get_remaining(9)hrtimer_get_next_event(9)hrtimer_next_event_without(9)hrtimer_setup(9)hrtimer_sleeper_start_expires(9)hrtimer_setup_sleeper_on_stack(9)
mwah π that's the page β brought to you from ./kernel/time, dated October 2026, in the Kernel API Manual, and signed off with so much love it's giving unhinged πβ¨π
π¦ 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