bpf_cpumask_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bpf_cpumask_empty(9) β€” like, the kernel API manual, bestie ✨

Okay so this is a page from the Kernel API Manual, and today's main character is bpf_cpumask_empty β€” yes, the whole function name goes in the header, we don't make the rules. Let's get into it 🫢


🌸 NAME 🌸

bpf_cpumask_empty β€” check if a cpumask is empty.

That's it. That's the whole job. Vibe check for a cpumask: is it giving nothing? πŸ’€


✨ SYNOPSIS ✨

__bpf_kfunc bool bpf_cpumask_empty (const struct cpumask *cpumask );

Like, the signature is right there, copy it exactly, no cap. Note the __bpf_kfunc β€” very demure, very kernel. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cpumask β€” the cpumask being checked. Yeah. That's the one. We're looking at this one. πŸ‘€

πŸ’– RETURN πŸ’–

  • true β€” none of the bits in cpumask are set. Empty. Void. A beautiful blank canvas. 🌈
  • false β€” at least one bit in cpumask is set. There's something in there, bestie. πŸ”₯

Literally a bool. Two options. Iconic, honestly.


🌸 DESCRIPTION 🌸

A struct bpf_cpumask pointer may be safely passed to cpumask.

That's the whole description. It's short, it's sweet, it's telling you the one thing you need to know: you can hand a struct bpf_cpumask pointer straight over to cpumask and it's fine, no drama, no segfault energy. 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./kernel/bpf/cpumask.c β€” go read it, iykyk β€” plus the whole cpumask friend group, fr fr:

Yeah, that's a lot of siblings. Big family. All of them valid, all of them listed, none of them skipped. πŸ’…

And that's the page!! πŸŽ€ Sourced out of ./kernel/bpf, dated October 2026 β€” so go forth, check your cpumasks, and remember: bpf_cpumask_empty(9) is literally just asking "is this bitmask empty or not" and honestly? Slay. πŸ¦‹βœ¨

πŸ“¦ where this page comes from