schedule_preempt_disabled(9)
π schedule_preempt_disabled β a Kernel API Manual moment
okay so bestie, welcome to the little page for schedule_preempt_disabled(9), straight out of the Kernel API Manual. it's short, it's iconic, it's lowkey doing a lot with very few words. let's get into it π«Ά
β¨ NAME β¨
schedule_preempt_disabled β the one you call when preemption is already switched off. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
void schedule_preempt_disabled (void );
that's it. that's the whole signature. she's minimal, she's clean, she's giving main character energy π
π ARGUMENTS π
voidβ no arguments, bestie. zero. nada. nothing to pass in, nothing to stress about π
β DESCRIPTION β
so here's the tea: this function returns with preemption disabled. like, you go in with preemption off and you come back out with preemption off. the vibe check stays the same the entire time β¨
β οΈ and listen β the note is important: preempt_count must be 1. not zero, not two, not "eh somewhere around there". it's 1. respect the count, fr fr π
π¦ SEE ALSO π¦
the whole friend group, in Kernel file ./kernel/sched/core.c:
wake_q_add(9)wake_q_add_safe(9)task_curr(9)try_to_wake_up(9)task_call_func(9)cpu_curr_snapshot(9)wake_up_process(9)preempt_notifier_register(9)preempt_notifier_unregister(9)prepare_task_switch(9)finish_task_switch(9)schedule_tail(9)preempt_schedule_notrace(9)init_idle(9)curr_task(9)
like, the scheduler core squad is right there β go read them too, iykyk π
π okay that's the page!! thanks for coming to my ted talk π§π this little writeup came from ./kernel/sched, dated October 2026, and it's filed under schedule_preempt_disabled(9). slay, bye bestie πβ¨
π¦ 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