cpumask_first_and_and(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– cpumask_first_and_and β€” Kernel API Manual ✨

okay so bestie, sit down, because this little icon of a function is about to make your whole cpu-mask life easier πŸ’…


🌸 NAME 🌸

cpumask_first_and_and β€” literally returns the first cpu from *srcp1 & *srcp2 & *srcp3 πŸŽ€


✨ SYNOPSIS ✨

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

no cap, that's the whole signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • srcp1 β€” the first input πŸ‘‘
  • srcp2 β€” the second input πŸ‘‘
  • srcp3 β€” the third input πŸ‘‘ (yes girl, three of them, it's giving three-way AND)

🌈 RETURN 🌈

>= nr_cpu_ids if no cpus are set in all of them 🫠 β€” so like, if the intersection comes up empty, you're not getting a real cpu id back, periodt.

πŸ’€ heads up bestie: you gotta check that return value yourself. An empty overlap means you get something >= nr_cpu_ids, not a cute little error code.

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group is in the group chat, iykyk πŸ’– Kernel file ./include/linux/cpumask.h


okay that's the whole page bestie, you ate that πŸ“βœ¨ this gem lives in ./include/linux and the manual was dated October 2026 β€” go forth and intersect those masks, main character energy only πŸ’œπŸ§š

πŸ“¦ where this page comes from