alloc_cpumask_var(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… alloc_cpumask_var(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the alloc_cpumask_var page, straight out of the kernel API manual πŸŽ€


✨ NAME ✨

alloc_cpumask_var β€” allocate a struct cpumask πŸ¦‹


🌸 SYNOPSIS 🌸

bool alloc_cpumask_var (cpumask_var_t *mask , gfp_t flags );

πŸŽ€ ARGUMENTS πŸŽ€

  • mask β€” pointer to a cpumask_var_t where the cpumask gets returned 🫢 this is where the goods land, bestie.
  • flags β€” GFP_ flags πŸ’« the usual allocation-vibe knobs.

πŸ’œ DESCRIPTION πŸ’œ

so here's the thing πŸ‘‘ this function is only defined when CONFIG_CPUMASK_OFFSTACK=y. if that config isn't set, it's literally just a nop that returns a constant 1 (and it lives in <linux/cpumask.h>). no cap, that's the whole bit πŸ™ˆ

also, go look at alloc_cpumask_var_node β€” it's giving sibling energy 🌈


⭐ RETURN ⭐

  • true when the allocation succeeded β€” slay πŸ’…
  • false when it didn't β€” not slay 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/cpumask.h β€” plus this whole iconic lineup, fr fr:


and that's the page, bestie πŸ§šπŸ’– this lil icon dropped from ./include/linux back in October 2026 β€” dated and sourced, periodt. πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from