bpf_cpumask_empty(9)
π 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 incpumaskare set. Empty. Void. A beautiful blank canvas. πfalseβ at least one bit incpumaskis 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:
struct bpf_cpumask(9)bpf_cpumask_create(9)bpf_cpumask_acquire(9)bpf_cpumask_release(9)bpf_cpumask_first(9)bpf_cpumask_first_zero(9)bpf_cpumask_first_and(9)bpf_cpumask_set_cpu(9)bpf_cpumask_clear_cpu(9)bpf_cpumask_test_cpu(9)bpf_cpumask_test_and_set_cpu(9)bpf_cpumask_test_and_clear_cpu(9)bpf_cpumask_setall(9)bpf_cpumask_clear(9)bpf_cpumask_and(9)bpf_cpumask_or(9)bpf_cpumask_xor(9)bpf_cpumask_equal(9)bpf_cpumask_intersects(9)bpf_cpumask_subset(9)bpf_cpumask_full(9)bpf_cpumask_copy(9)bpf_cpumask_any_distribute(9)bpf_cpumask_any_and_distribute(9)bpf_cpumask_weight(9)bpf_cpumask_populate(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms