bpf_cpumask_clear_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bpf_cpumask_clear_cpu(9) β€” a Kernel API Manual moment

okay bestie, so this is bpf_cpumask_clear_cpu(9) from the Kernel API Manual, and it's literally a one-job icon: it clears the bit for a CPU in a BPF cpumask. that's the whole vibe. πŸŽ€


✨ NAME ✨

bpf_cpumask_clear_cpu β€” clear a bit for a CPU in a BPF cpumask. that's it, that's the function, she's focused and she's serving 🫢


🌸 SYNOPSIS 🌸

__bpf_kfunc void bpf_cpumask_clear_cpu (u32 cpu , struct bpf_cpumask *cpumask );

look at her. __bpf_kfunc, returns void, two args. no notes. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cpu β€” the CPU to be cleared from the cpumask. like, this specific CPU's bit is getting yeeted out of the mask. bye boo πŸ‘‹
  • cpumask β€” the BPF cpumask in which a bit is being cleared. this is the mask that's getting edited, and yeah, she's the main character here πŸ‘‘

πŸ’– SEE ALSO πŸ’–

okay this is the friend group, and honestly they're all iconic. first up, the kernel file itself: ./kernel/bpf/cpumask.c, plus struct bpf_cpumask(9), and then the whole squad:

ngl, bpf_cpumask_set_cpu(9) is literally her counterpart β€” one sets, one clears, it's giving duality 🌈 and bpf_cpumask_test_and_clear_cpu(9) is the combo meal if you wanna check and clear, iykyk 😭


fr fr, if you're clearing a bit, make sure that mask is actually somewhere you're allowed to be touching. this page won't hold your hand on that one 🫢

okay that's the whole page, no cap β€” and before you go, the receipts: this one lives under ./kernel/bpf, it's the October 2026 edition of bpf_cpumask_clear_cpu(9). go clear some bits bestie, you're gonna slay πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from