cpumask_weight_andnot(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumask_weight_andnot(9) β€” Kernel API Manual, bestie edition πŸŽ€

okay so we're in the Kernel API Manual, section 9, and today's main character is cpumask_weight_andnot. Yes the name is a mouthful. No we're not skipping it. πŸ¦‹


✨ NAME ✨

cpumask_weight_andnot β€” literally "Count of bits in (*srcp1 & ~*srcp2)" πŸ’–


🌸 SYNOPSIS 🌸

unsigned int cpumask_weight_andnot (const struct cpumask *srcp1 , const
       struct cpumask *srcp2 );

that's the whole vibe. two masks in, one unsigned int out. slay. ✨


🫢 ARGUMENTS 🫢

  • srcp1 β€” the cpumask to count bits (< nr_cpu_ids) in. 🧚
  • srcp2 β€” the cpumask to count bits (< nr_cpu_ids) in. 🧚

yes they have the exact same description. no that's not a typo on my end, that's just how the page is giving it. both of them are cpumasks, both of them only have bits < nr_cpu_ids in play. iykyk. πŸ’…


πŸ‘‘ RETURN πŸ‘‘

count of bits set in both *srcp1 and *srcp2 ⭐

(that's what the page says, word for word, and i'm just the messenger with a cute font πŸ’€ β€” read the NAME line again if you want the mask-flavored version, that's the one with the ~ in it πŸ™ˆ)


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/cpumask.h β€” and like, an entire friend group:

like i said. whole friend group. invite them all to the group chat. 🫢✨


lowkey reminder bestie: this page lives in ./include/linux, it's dated October 2026, and the manpage signature is cpumask_weight_andnot(9). πŸŽ€

that's the whole page, no cap, every bit intact β€” go count some bits, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from