__bitmap_shift_right(9)
π« __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 π
- Kernel file
./lib/bitmap.c bitmap introduction(9)β start here if you're new, she's iconic__bitmap_shift_left(9)bitmap_cut(9)bitmap_find_next_zero_area_off(9)bitmap_pos_to_ord(9)bitmap_remap(9)bitmap_bitremap(9)bitmap_onto(9)bitmap_fold(9)bitmap_from_arr32(9)bitmap_to_arr32(9)bitmap_from_arr64(9)bitmap_to_arr64(9)
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
- 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