tick_setup_oneshot(9)
π tick_setup_oneshot(9) β like, the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, the clock is doing its thing, and you need one specific event device to go into oneshot mode (that's hres or nohz, iykyk). This little function? It's the one that sets that up. It lives in the Kernel API Manual, and honestly it's giving main character energy in ./kernel/time. β¨
πΈ SYNOPSIS πΈ
void tick_setup_oneshot (struct clock_event_device *newdev , void
(*handler)(struct clock_event_device *) , ktime_t next_event );
no cap, that's the whole signature. Three args, one void, zero drama. π«Ά
π¦ ARGUMENTS π¦
newdevβ pointer to the clock event device you're configuring. It's the device. Your fave. The one getting the glow-up. πhandlerβ the function that gets called when the event device triggers an interrupt. Like, when it fires, this is who picks up the phone. βοΈnext_eventβ the initial expiry time for the next event, inktime. That's literally the when. β°
β DESCRIPTION β
So here's the vibe check: this function configures the clock event device you passed in for oneshot mode, assigns the handler you gave it as its event callback (yes, that handler, the one you chose, iconic), and programs the device to trigger at the next_event time you specified.
Setup, assign, program. Three steps, one function, absolutely ate. π₯
π SEE ALSO π
- Kernel file
./kernel/time/tick-oneshot.cβ go read it, fr fr π tick_program_event(9)tick_resume_oneshot(9)tick_switch_to_oneshot(9)tick_oneshot_mode_active(9)tick_init_highres(9)
like a whole friend group of tick functions honestly π§
mwah π this page came from ./kernel/time, dated October 2026, and it's filed under tick_setup_oneshot(9) β go forth and schedule your oneshots, bestie, you got this ππ
π¦ 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