__ffs64(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 __ffs64 🌈

okay so bestie, welcome to the Kernel API Manual page for __ffs64 πŸ’… she finds the first set bit in a 64 bit word, and honestly? iconic.


πŸŽ€ NAME πŸŽ€

__ffs64 β€” find first set bit in a 64 bit word ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int __ffs64 (u64 word );

πŸ“ ARGUMENTS πŸ“

  • word β€” the 64 bit word. that's the value you're handing over, bestie 🫢

πŸ’– DESCRIPTION πŸ’–

On 64 bit arches this is a synonym for __ffs.

Real talk though: the result is not defined if no bits are set 😭 so check that word is non-zero before calling this. like, do the vibe check first, fr fr.

no cap: if you skip that check, the result is not defined β€” so please don't come crying to me.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/bitops.h is in the group chat, along with the whole squad:


mwah πŸ’– source/version: ./include/linux, dated October 2026. __ffs64(9) out. periodt. πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from