1FFS(9) Basic C Library Functions FFS(9)
23
4
NAME
6ffs - find first set bit in word
7
SYNOPSIS
9int ffs(int x);
10
ARGUMENTS
12x
13the word to search
14
DESCRIPTION
16This is defined the same way as the libc and compiler builtin ffs
17routines, therefore differs in spirit from the other bitops.
1819
ffs(value) returns 0 if value is 0 or the position of the first set bit
20if value is nonzero. The first (least significant) bit is at position
211.
22
COPYRIGHT
24Kernel Hackers Manual 3.10 June 2019 FFS(9)