__SCX_CMASK_DEFINE(9)
β¨ __SCX_CMASK_DEFINE β¨
okay bestie, gather round π this is a page from the Kernel API Manual and it's genuinely so cute β it's all about defining an on-stack cmask with explicit storage capacity. no cap, it's a little macro with main character energy π
π SYNOPSIS π
__SCX_CMASK_DEFINE (NAME , BASE , NR_CIDS , ALLOC_CIDS );
πΈ ARGUMENTS πΈ
NAMEβ the variable name you're defining, periodt. that's literally its whole job πBASEβ the first cid of the active range π₯NR_CIDSβ the length of the active range, iykyk πALLOC_CIDSβ the storage capacity in cids, and it's gotta be at leastNR_CIDSβ no shrinking below that, fr fr β οΈ
π¦ DESCRIPTION π¦
so NAME aliases zero-initialized storage β¨ with the active range set to [BASE, BASE + NR_CIDS). that's it, that's the vibe π«Ά
and then later, when you want a different shape? use scx_cmask_reframe to reshape it β up to ALLOC_CIDS, bestie π
π SEE ALSO π
- Kernel file
./kernel/sched/ext/types.hβSCX_CMASK_DEFINE(9),SCX_CMASK_DEFINE_SHARD(9)π
lowkey obsessed with how tidy this macro is. go forth and define your cmasks, icon π§
and that's the whole page, bestie π sign-off time: this one lives in ./kernel/sched/ext, and it's dated October 2026 β π bye babes π
π¦ 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