clockevents_switch_state(9)
β¨ clockevents_switch_state β bestie's guide to clock event device states β¨
okay so this is clockevents_switch_state from the Kernel API Manual (section 9, kernel-space tea π«). Yes it's a kernel function. Yes it's gonna be fun. Let's go π
πΈ NAME πΈ
clockevents_switch_state β sets the operating state of a clock event device. that's it, that's the whole vibe. it flips the state, you move on with your life β¨
π¦ SYNOPSIS π¦
void clockevents_switch_state (struct clock_event_device *dev , enum clock_event_state state );
literally the whole signature, copy it exactly, don't @ me π
π ARGUMENTS π
devβ the device to modify π like, the clock event device you're messing with. it's the main character here.stateβ the new state π the state you wantdevto be in afterwards. icon behavior.
π DESCRIPTION π
okay so here's the thing, and i need you to actually hear me on this:
Must be called with interrupts disabled !
like, capital-M Must. interrupts. disabled. no cap. if you call this without interrupts disabled you are not slaying, you are simply not slaying π
that's the whole description, she's short and she's serious π«Ά
β SEE ALSO β
the full friend group, all of them, in order, no one gets left out π
- Kernel file
./kernel/time/clockevents.c clockevent_delta2ns(9)clockevents_shutdown(9)clockevents_tick_resume(9)clockevents_increase_min_delta(9)clockevents_program_min_delta(9)clockevents_program_min_delta(9)β yes she's listed twice, she's just that iconic, i don't make the rules πclockevents_program_event(9)clockevents_register_device(9)clockevents_config_and_register(9)clockevents_update_freq(9)clockevents_exchange_device(9)clockevents_suspend(9)clockevents_resume(9)tick_offline_cpu(9)
π§ tiny reminder before you go: interrupts disabled. that's the whole personality of this function. do not forget the interrupts. i'm begging π
and that's the page bestie!! this one lives in ./kernel/time, dated October 2026 β mwah, love that for us πβ¨π see you in the next man page, bye!! π¦πΈπ
π¦ 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