task_curr(9)
πΈ task_curr πΈ
okay so this page is straight out of the Kernel API Manual, and it's here to answer one very specific question, bestie: is this task currently executing on a CPU? let's get into it π
π NAME π
task_curr β literally the vibe check for whether a task is currently executing on a CPU β¨
π¦ SYNOPSIS π¦
int task_curr (const struct task_struct *p );
π ARGUMENTS π
pβ the task in question, bestie. that's the one you're asking about π«Ά
β RETURN β
1 if the task is currently executing. 0 otherwise. no cap, that's the whole return situation π
π SEE ALSO π
- Kernel file
./kernel/sched/core.c wake_q_add(9)wake_q_add_safe(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)schedule_preempt_disabled(9)preempt_schedule_notrace(9)init_idle(9)curr_task(9)
and that's the page, bestie π«Ά source/version: ./kernel/sched, dated October 2026 β iconic, periodt π
π¦ 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