cpumask_shift_right(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cpumask_shift_right β€” the Kernel API Manual page, but make it make sense ✨

okay so this is a page straight out of the Kernel API Manual (the (9) section, devs only, iykyk) and it's honestly so simple it's iconic. No cap: one function, three arguments, one glorious little bit-shift. Let's get into it 🫢


🌸 NAME 🌸

cpumask_shift_right β€” literally just *dstp = *srcp >> n πŸ’…

that's the whole thing. that's the function. she's a one-liner and she knows it.


✨ SYNOPSIS ✨

void cpumask_shift_right (struct cpumask *dstp , const struct cpumask
*srcp , int n );

void return (nothing comes back, it's not that kind of girl), takes a destination cpumask pointer, a source cpumask pointer, and an int. that's the whole vibe check πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

listen bestie, there are exactly three and they're all doing their little jobs:

  • dstp β€” the cpumask result πŸ’– this is where the answer lands, main character energy, she gets to hold the output
  • srcp β€” the input to shift 🌸 this is the one getting shifted, the origin story
  • n β€” the number of bits to shift by ⭐ the literal amount, the number of steps, keep it exact
ngl the arg names are short but they said what they said. dstp is destination, srcp is source, n is... n. periodt.

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where the manpage goes feral and lists, like, everything in the cpumask cinematic universe. and I mean everything. not me obsessing over a header file 😭

the kernel file is ./include/linux/cpumask.h β€” that's the source of truth, go say hi πŸ’œ

the first-ers πŸ“

the next-ers 🧚

the for_each loops 🌈

the any / nth girlies πŸ‘‘

the set / clear / test crew πŸ’…

the bitwise baddies πŸ”₯

the counting + shifting + copying icons πŸ’–

the any / of / parsing squad πŸ¦‹

the allocation + conversion + print gang 🌸

and yeah β€” cpumask_shift_left(9) is literally right there in the list, her sister, the other direction, go read that one too if you're feeling spicy 🌢️


heads up bestie: this page is short. it gives you the signature and the args and then hands you the entire cpumask extended universe to go explore. that's not me skipping anything, that's genuinely the whole page πŸ’€

okay that's the tea 🍡 this was served up from ./include/linux and dated October 2026, and the header up top was cpumask_shift_right(9) from the Kernel API Manual β€” so go shift some bits, be gorgeous, and remember: right shift is just left shift's cooler sibling. mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from