cpumask_any_and(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumask_any_and (kernel API manual, bestie edition)

okay so picture this: you're deep in the kernel, you've got two cpumasks, and you need literally any cpu that's in both of them. not the first one, not the last one, not a specific one β€” just. any. and that's exactly what this icon does ✨ it's giving intersection energy, fr fr.


🌸 NAME 🌸

cpumask_any_and β€” pick an arbitrary cpu from *mask1 & *mask2 🎯

like yes bestie, it's the "any" girlie of the cpumask family, but she's doing it and-style. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

cpumask_any_and (mask1 , mask2 );

(and yes the spacing is exactly like that, don't come for me, that's just how the page is printed πŸ™ˆ)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • mask1 β€” the first input cpumask. one half of the situationship πŸ’”
  • mask2 β€” the second input cpumask. the other half 🫢

the two of them get ANDed together, and we pick an arbitrary cpu out of that intersection. slay.


πŸ”₯ RETURN πŸ”₯

>= nr_cpu_ids if no cpus set.

⚠️ okay so this is the part where you pay attention bestie: if the intersection is empty, you don't get a valid cpu β€” you get something >= nr_cpu_ids. that's the "no cpus set" signal. literally do not treat it as a cpu id. check it. periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

so this is the part where the page just. lists everyone. and I mean everyone. it's giving group chat with 61 members and honestly? iconic. all of them live in the kernel file ./include/linux/cpumask.h πŸ’–

iykyk πŸ’… go read some of them, they're all lowkey great.


that's the whole page bestie, no notes. this one came straight out of the ./include/linux directory, October 2026 edition β€” so like, reasonably fresh 🌈 catch you in the next manpage, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from