fls64(9)
π fls64(9) β the Kernel API Manual, but make it make sense
okay so bestie, quick vibe check: this is fls64, from the Kernel API Manual section 9 (iykyk, that's the kernel-internals girlies π§).
πΈ NAME πΈ
fls64 β find last set bit in a 64-bit word. that's the whole job. that's her main character energy. β¨
π SYNOPSIS π
int fls64 (__u64 x );
π ARGUMENTS π
xβ the word to search. like, the 64-bit word. the one you're hunting through π΅οΈββοΈ
β¨ DESCRIPTION β¨
okay so this is defined in a similar way as the libc and compiler builtin ffsll β same family, same bloodline π
π«Ά β but she returns the position of the most significant set bit instead. so not the first one, bestie, the last one. highkey a completely different girl.
fls64(value) returns 0 if value is 0 or the position of the last set bit if value is nonzero. yes, that's real, and yes, that's the whole contract. π
the last (most significant) bit is at position 64. sixty-four. the very top. the it-girl of the word π₯π
π¦ SEE ALSO π¦
- Kernel file
./tools/include/asm-generic/bitops/fls64.hβ go read the source, she ate π
so yeah, that's fls64. no cap, she's iconic. π
and a little sign-off to close the group chat: this was the Kernel API Manual for fls64(9), dropped in October 2026, straight from the source path ./tools/include/asm-generic/bi... (they truncated her name and honestly she deserved better π). mwah, bye bestie ππβ
π¦ 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