cpumask_weight_and(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumask_weight_and β€” the Kernel API Manual, but make it group chat

okay so bestie, you're in the cpumask_weight_and(9) page of the Kernel API Manual and honestly? it's a little icon. short, sweet, does exactly one job. let's get into it ✨


🌸 NAME 🌸

cpumask_weight_and β€” it gives you the count of bits in (*srcp1 & *srcp2). that's it. that's the whole vibe. it ANDs two cpumasks together and then tells you how many bits survived the mashup πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

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

two const pointers in, one unsigned int out. no cap, that's the whole signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • srcp1 β€” the cpumask to count bits (< nr_cpu_ids) in. yes queen, same energy as the next one πŸ‘‘
  • srcp2 β€” the cpumask to count bits (< nr_cpu_ids) in. that's it, that's the parameter πŸ’…
both of them are just cpumasks whose bits are under nr_cpu_ids β€” nothing spicy, nothing sneaky, we love a low-drama argument list 🌈

⭐ RETURN ⭐

the count of bits set in both *srcp1 and *srcp2. both. like, it's giving "we're only counting the bits that showed up to the group hang" πŸŽ€ the overlap, the shared plans, the bits that said yes to both invites πŸ₯°


πŸ”₯ SEE ALSO πŸ”₯

bestie, buckle up, because the Kernel file ./include/linux/cpumask.h is a whole friend group and this page is listing everyone β€” not me dropping a single name, we're doing the full roster 😭

like… the way this page knows literally everyone? main character energy for a function that just counts bits πŸ’€πŸ‘‘


anyway, that's the whole page bestie, no filler, no fluff, just bits being counted in the overlap πŸ’œ

okay bye ily, this was cpumask_weight_and(9) from ./include/linux, dated October 2026 β€” see you in the next man page, mwah πŸ“πŸ§šβœ¨

πŸ“¦ where this page comes from