scx_cmask_ref_or(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_cmask_ref_or β€” a.k.a. the "OR it in, bestie" moment πŸ’…

okay so real talk, this page is from the Kernel API Manual (section 9, the fancy kernel-internals section, iykyk) and it's all about scx_cmask_ref_or, which is a whole vibe. buckle up πŸŽ€


✨ NAME ✨

scx_cmask_ref_or β€” OR @src into the arena cmask referenced by @ref. that's it, that's the tweet. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void scx_cmask_ref_or (const struct scx_cmask_ref *ref , const struct
scx_cmask *src );

literally just one function, no return value, void energy, it's giving "I do the thing and I don't owe you a return code" πŸ’€


🌸 ARGUMENTS 🌸

  • ref β€” a validated ref. it's already been vibe-checked, so you can trust it 🫢
  • src β€” a stable kernel cmask. stable as in "not going anywhere", not as in "horse". 🐎

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜• β€” the bits that live inside the intersection of ref's snapshotted range and src's range get OR'd into ref->src. and the bits outside that intersection? untouched. left completely unchanged. not me ignoring my responsibilities πŸ’…

and the stores on ref->src use WRITE_ONCE, because BPF may read/write concurrently β€” like, at the same time, no cap. so we're being polite about it. WRITE_ONCE is the main character here and it's carrying the whole function, honestly πŸ‘‘

ngl, if you're out here ignoring the concurrent read/write situation you're gonna have a bad time β€” the manpage is very clear that WRITE_ONCE is there because BPF can read and write concurrently. that's the whole reason. don't skip it. 😭

πŸ’œ SEE ALSO πŸ’œ

the whole friend group πŸ’– the kernel file is ./kernel/sched/ext/cid.c and it's surrounded by icons:

all 9's, all iconic, all in the group chat. go read them too, bestie, they ate πŸ”₯


πŸŽ€ the cute sign-off πŸŽ€

this page lives in ./kernel/sched/ext (the source, the home base, the main character address) and it's dated October 2026 β€” yes, the future, because we're ahead of the game ⭐ and the whole thing is filed as scx_cmask_ref_or(9), which is also its version tag situation, and honestly? it's giving iconic. periodt. πŸ’…βœ¨πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from