bpf_cpumask_intersects(9)
π bpf_cpumask_intersects β the Kernel API Manual of "do these two cpumasks share a bit, bestie?" π
ok so picture this: you're in bpf_cpumask_intersects(9), the section 9 of the Kernel API Manual, and you just wanna know if two cpumasks are vibing on the same bit. That's literally it. That's the whole function. Let's get into it β¨
πΈ SYNOPSIS πΈ
__bpf_kfunc bool bpf_cpumask_intersects (const struct cpumask *src1 ,
const struct cpumask *src2 );
that's the whole signature, no cap. two const struct cpumask * pointers walk in, a bool walks out π«Ά
π¦ ARGUMENTS π¦
src1β the first input, bestie. your opening act. the main character of the pair πsrc2β the second input. the plus-one. the other half of the duo π
β RETURN β
trueβsrc1andsrc2have at least one of the same bits set. they overlap. they're matching. it's giving soulmate energy π₯falseβsrc1andsrc2don't have any of the same bits set. zero overlap. not a single shared bit. it's giving two strangers at the same party π
π DESCRIPTION π
so here's the tea: struct bpf_cpumask pointers may be safely passed to src1 and src2. that's it, that's the note. safe to pass π«Ά no sketchy casts, no "are you sure", you're good.
π SEE ALSO π
the lore, the family tree, the whole group chat:
- Kernel file
./kernel/bpf/cpumask.c 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_subset(9)bpf_cpumask_empty(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)
ok that's the whole page, go check your bits and slay π β¨
this cutie dropped from ./kernel/bpf in October 2026, and yeah, the header said bpf_cpumask_intersects(9) at the top and the footer said the same down here β iconic bookends, honestly π
π¦ 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