fls(9)
okay bestie, welcome to fls(9) from the Kernel API Manual β this is the bit-hunting page and it's lowkey iconic πβ¨
πΈ NAME πΈ
fls β find the last (most-significant) bit set. that's the whole vibe: last bit, most-significant, set. periodt π
β¨ SYNOPSIS β¨
int fls (unsigned int x );
yup, that's the signature, don't @ me π«Ά
π ARGUMENTS π
xβ the word to search. literally the word you're sending in to get searched ππ
π DESCRIPTION π
okay so this is defined the same way as ffs β no cap, same definition energy.
and here's the note you need to keep in your group chat: fls(0) = 0, fls(1) = 1, and fls(0x80000000) = 32 β. write those down, bestie, they're giving exam-question main character energy π
π¦ SEE ALSO π¦
- Kernel file
./include/asm-generic/bitops/builtin-fls.hβ go read it if you want the source tea π΅π
sign-off time: source/version ./include/asm-generic/bitops, dated October 2026, manual fls(9) β mwah, go slay those 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