to_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so welcome to to_cpumask(9) from the Kernel API Manual πŸ’… β€” it converts a NR_CPUS bitmap into a struct cpumask *, and honestly? iconic behavior.


🌸 SYNOPSIS 🌸

to_cpumask (bitmap );

πŸŽ€ ARGUMENTS πŸŽ€

  • bitmap β€” the bitmap. that's the vibe check, bestie.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the lore: there are a few places where cpumask_var_t isn't appropriate and static cpumasks must be used (eg. very early boot), but we don't expose the definition of struct cpumask. awkward? a little. main character energy? absolutely.

to_cpumask does the conversion, and it can be used as a constant initializer. slay.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/cpumask.h β€” and bestie, the whole cpumask squad is linked:


k bye bestie 🫢 this page is signed off from ./include/linux, dated October 2026 β€” to_cpumask(9) out πŸ’–

πŸ“¦ where this page comes from