bitmap_from_u64(9)
π NAME π
okay so bestie, meet bitmap_from_u64 β it's a Kernel API Manual page (yes, bitmap_from_u64(9), that's her full name π
) and her whole job is literally check and swap words within u64. that's it. that's the vibe. π¦
β¨ SYNOPSIS β¨
void bitmap_from_u64 (unsigned long *dst , u64 mask );
like, she takes two things and returns nothing. void queen energy, no cap. π
π ARGUMENTS π
dstβ the destination bitmap π― (where the good stuff lands)maskβ the source bitmap πΈ (where the good stuff comes from)
π¦ DESCRIPTION π¦
okay so here's the tea β and it's honestly such a specific little gremlin of a problem:
in a 32-bit Big Endian kernel, when you use (u32 *)(val)[*] to read a u64 mask, you get the wrong word. like, not me getting the wrong word π
that means (u32 *)(val)[0] grabs the upper 32 bits β but we expect the lower 32-bits of the u64. so, yeah, endianness said "not today bestie" and now this whole function exists to fix it. highkey iconic of her ngl. π₯
π SEE ALSO π
bestie, the whole friend group shows up here, so let's do a headcount π«Ά:
- Kernel file
./include/linux/bitmap.h bitmap overview(9)bitmap bitops(9)declare bitmap(9)bitmap_find_next_zero_area(9)bitmap_or_equal(9)bitmap_weight_from(9)bitmap_scatter(9)bitmap_gather(9)bitmap_release_region(9)bitmap_allocate_region(9)bitmap_find_free_region(9)BITMAP_FROM_U64(9)bitmap_read(9)bitmap_write(9)
like literally the entire bitmap cinematic universe. go read them all, iykyk π
fr fr, that's the whole page. she's short, she's specific, she's a little endian-coded icon. π§
and that's a wrap, bestie β this one came straight out of ./include/linux, dated October 2026, so you know it's fresh πΈβ¨π
π¦ 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