scx_cmask_ref_copy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_cmask_ref_copy(9)

okay so first things first, this is a page from the Kernel API Manual, section 9, and the star of the show is scx_cmask_ref_copy. bestie, we're in the kernel scheduler files rn, so hydrate and pay attention πŸ’–


✨ NAME ✨

scx_cmask_ref_copy β€” literally copies @src into the arena cmask that @ref is pointing at 🫢


πŸŽ€ SYNOPSIS πŸŽ€

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

that's it, that's the whole signature, no cap ✨


🌸 ARGUMENTS 🌸

  • ref β€” a validated ref. like, it's already been checked, so it's good to go πŸ’…
  • src β€” a stable kernel cmask. this is the source of truth we're copying from πŸ¦‹

🧚 DESCRIPTION 🧚

so here's the vibe check πŸ”₯ β€” the bits that live inside the intersection of ref's snapshotted range and src's range take src's values. everything outside that intersection? left completely untouched, exactly as it was πŸ™ˆ

and the stores on ref->src use WRITE_ONCE, because BPF may be reading and writing at the same time 😭 so like... concurrency is real, we're being safe about it, periodt.


πŸ‘‘ SEE ALSO πŸ‘‘

okay so there's a whole friend group here, iykyk:


🌈 and that's the whole page bestie! this one's straight out of ./kernel/sched/ext, dated October 2026, and the page is scx_cmask_ref_copy(9) β€” go forth and copy those cmasks πŸ’œπŸŽ€β­

πŸ“¦ where this page comes from