__flogr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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