count_active_contexts(9)
πΈ NAME πΈ
okay so this page is count_active_contexts(9) from the Kernel API Manual, and it does exactly what the name says, no cap: count nr of active tasks. π
β¨ SYNOPSIS β¨
unsigned long count_active_contexts (void );
π ARGUMENTS π
voidβ no arguments. literally none. zero. empty set. she takes nothing. π«Ά
π¦ DESCRIPTION π¦
Return the number of tasks currently running or waiting to run. that's the whole vibe check: if a task is on the CPU or queued up ready to go, it counts. π
Note that we don't take runq_lock / list_mutex here. Reading a single 32bit value is atomic on powerpc, and we don't care about memory ordering issues here. so yeah, no locking moment, and that's intentional. π₯
π SEE ALSO π
- Kernel file:
./arch/powerpc/platforms/cell/spufs/sched.c spu_bind_context(9)spu_unbind_context(9)find_victim(9)spu_unschedule(9)spu_activate(9)grab_runnable_context(9)spu_deactivate(9)spu_yield(9)spu_calc_load(9)
signing off from ./arch/powerpc/platforms/cell/..., October 2026, count_active_contexts(9) β bestie, go count some contexts responsibly πβ¨
π¦ 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