__flogr(9)
π __flogr (kernel API manual, yes bestie we're in the kernel now)
okay so this is __flogr, sitting pretty in the Kernel API Manual β very demure, very s390 of her. She's here to find the leftmost one, and lowkey she eats at it. π
β¨ NAME β¨
__flogr β find leftmost one. That's it, that's the whole vibe.
And then there's the @word situation: the word to search. That's what we're looking in, bestie. π
πΈ SYNOPSIS πΈ
unsigned long __flogr (unsigned long word );
yeah, that's the whole signature. word goes in, unsigned long comes out, no cap. β¨
π ARGUMENTS π
wordβ okay so, funny thing, the original literally says-- undescribed --. So like... it's the word. We search it. The source material is giving mysterious main character energy and honestly? Respect. π
π¦ DESCRIPTION π¦
so here's the tea, bestie: __flogr returns the bit number of the most significant bit that's set. π―
and here's the twist that trips people up β the most significant bit has bit number 0. like, yes, zero. the biggest one is named zero. it's giving chaotic numbering system but we don't make the rules, the kernel does. π
and if no bit is set at all? she returns 64. that's the "nope, nothing in here" answer, periodt. π
ngl bestie, clock that number: 64 is the fallback, not some random -1 or whatever you were expecting. no bit set β 64. write it down. π
π SEE ALSO π
- Kernel file
./arch/s390/include/asm/bitops.hβ go read her, that's where the real lore lives, iykyk π ffs(9)β the cousin. check her out too π«Ά
π a lil sign-off π
this icon came to you from ./arch/s390/include/asm β that's the source, that's the home base π β stamped October 2026 β. she's fresh, she's dated, she's slaying. bye bestie, go set some bits π₯π
π¦ 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