__bitmap_shift_right(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« __bitmap_shift_right(9) πŸ’«

ok so this is a page straight out of the Kernel API Manual, and bestie, it's a little one but it slaps. we're talking a logical right shift of the bits in a bitmap. that's it. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

__bitmap_shift_right β€” logical right shift of the bits in a bitmap

like literally just sliding bits to the right, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void __bitmap_shift_right (unsigned long *dst , const unsigned long *src
, unsigned shift , unsigned nbits );

yes the signature is formatted kinda weird, that's just how the kernel likes it, don't come for me πŸ™ˆ


🌸 ARGUMENTS 🌸

  • dst β€” the destination bitmap, aka where the results land. she's the main character of the output πŸ’–
  • src β€” the source bitmap, aka where we're reading the bits from. the origin story ✨
  • shift β€” shift by this many bits. so like, how far we're scooting things over πŸ‘‰
  • nbits β€” bitmap size, in bits. gotta tell her how big she is or she has no idea where the edge is 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

ok so shifting right (which is, btw, the same energy as dividing) means moving the bits in the MS -> LS bit direction. most-significant sliding down toward least-significant, cute little journey 🌈

zeros get fed into the vacated MS positions β€” the empty spots up top get filled with zeros, no leftover drama β€” and the LS bits that get shifted off the bottom are just lost, gone, not coming back. πŸ’€ rip to those bits honestly.

fr fr: anything that falls off the low end does not come back. no rescue arc. plan accordingly.

πŸ‘‘ SEE ALSO πŸ‘‘

basically the whole bitmap friend group, go say hi πŸ’œ


⭐ ok that's the page!! source is ./lib, dated October 2026, and it's filed under __bitmap_shift_right(9) β€” mwah, thanks for reading, ily, go shift some bits responsibly πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from