generic___fls(9)
π¦ NAME π¦
okay bestie, meet generic___fls(9) from the Kernel API Manual π β it finds the last (most-significant) set bit in a long word. iconic little bit-hunter behavior, ngl.
β¨ SYNOPSIS β¨
unsigned int generic___fls (unsigned long word );
lowkey that's the whole signature. no cap.
πΈ ARGUMENTS πΈ
wordβ the word to search. that's the long word you're handing over for the vibe check π
π DESCRIPTION π
so bestie, this is undefined if no set bit exists π β like, no set bit at all means we're in undefined-behavior territory. so your code should check against 0 first, fr fr. that's the whole safety memo.
π SEE ALSO π
- Kernel file
./tools/include/asm-generic/bitops/__fls.hβ go read the source, bestie, it's giving lore π
mwah π β signing off with the footer tea: Kernel API Manual source/version vibes from ./tools/include/asm-generic/bi..., dated October 2026, with generic___fls(9) on the right, living its best life. π«Άβ¨
π¦ 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