hrtimer_setup_on_stack(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 off
  • clock_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:


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