cmask_next_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is cmask_next_set(9), straight from the Kernel API Manual, and it's literally here to find the first set bit at or after @cid. bestie, that's the whole vibe ✨

🌸 SYNOPSIS 🌸

u32 cmask_next_set (const struct scx_cmask __arena *m , u32 cid );

πŸŽ€ ARGUMENTS πŸŽ€

  • m β€” the cmask to search, periodt πŸ”
  • cid β€” the starting cid, and yes it gets clamped to m->base if it's below πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

So it returns the smallest set cid in [cid, m->base + m->nr_cids), or m->base + m->nr_cids if there isn't one. that out-of-range sentinel matches the termination condition used by cmask_for_each, iykyk 🫢

🌈 SEE ALSO 🌈

Kernel file ./tools/sched_ext/include/scx/cid.bpf.h β€” __cmask_init(9), cmask_init(9), cmask_reframe(9), cmask_from_cpumask(9) πŸ’…


source/version: ./tools/sched_ext/include/scx Β· date: October 2026 Β· page: cmask_next_set(9) β€” mwah, stay iconic bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from