generic_fls(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is the Kernel API Manual page for generic_fls(9) β€” and it does exactly what it says on the tin: find last (most-significant) bit set. πŸ’…

  • generic_fls β€” find last (most-significant) bit set

πŸ¦‹ SYNOPSIS πŸ¦‹

int generic_fls (unsigned int x );

πŸŽ€ ARGUMENTS πŸŽ€

  • x β€” the word to search. That’s the whole input, bestie. 🫢

πŸ’… DESCRIPTION πŸ’…

It’s defined the same way as ffs, no cap. Also note these little iconic values: fls(0) = 0, fls(1) = 1, and fls(0x80000000) = 32. Periodt. πŸ”₯

🌈 SEE ALSO 🌈

  • Kernel file ./tools/include/asm-generic/bitops/fls.h β€” go read the source, iykyk. πŸ‘‘

🫢 source/version: ./tools/include/asm-generic/bi... Β· date: October 2026 Β· signing off from generic_fls(9) πŸ’–

πŸ“¦ where this page comes from