hrtimer_setup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hrtimer_setup(9) πŸ’…

okay bestie, welcome to section 9 of the Kernel API Manual β€” yes we're in kernel space now, put your seatbelt on 🎒 this one's called hrtimer_setup(9) and it's literally the "get your timer ready" girlie.


✨ NAME ✨

hrtimer_setup β€” initialize a timer to the given clock ⏰


🌸 SYNOPSIS 🌸

void hrtimer_setup (struct hrtimer *timer , enum hrtimer_restart
(*function)(struct hrtimer *) , clockid_t clock_id , enum hrtimer_mode
mode );

πŸŽ€ ARGUMENTS πŸŽ€

  • timer β€” the timer to be initialized 🫢 this is the main character, the one getting set up
  • function β€” the callback function, aka what runs when the timer goes off, no cap
  • clock_id β€” the clock to be used, pick your timeline bestie πŸ•°οΈ
  • mode β€” the modes which are relevant for initialization:
    • HRTIMER_MODE_ABS
    • HRTIMER_MODE_REL
    • HRTIMER_MODE_ABS_SOFT
    • HRTIMER_MODE_REL_SOFT

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• the PINNED variants of the above can be handed in, but heads up β€” the PINNED bit is ignored, because pinning actually happens when the hrtimer is started. not at setup. periodt πŸ’… don't come for me, that's just how it is.


🌈 SEE ALSO 🌈

Kernel file ./kernel/time/hrtimer.c and its whole friend group:


okay that's the whole page, you ate that πŸ’– this lil' drop came from ./kernel/time, dated October 2026 β€” mwah, see u in the next manpage bestie πŸ§šβœ¨πŸ‘‘

πŸ“¦ where this page comes from