Standard C Library Functions ffs(3C)
NAME
ffs, ffsl, ffsll, fls, flsl, flsll - find first or last bit
set in a bit stringSYNOPSIS
#include
int ffs(int value); int ffsl(long value);int ffsll(long long value);
int fls(int value); int flsl(long value); flsll(long long value);DESCRIPTION
The ffs(), ffsl(), and ffsll() functions find the first bit
set in value and return the position of that bit. The fls(), fssl(), and flsll() functions find the last bit set in value and return the position of that bit. Bits are numbered starting at one (the least significant bit).RETURN VALUES
These functions return the position of the first bit set, or 0 if no bits are set in value.ERRORS
No errors are defined.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 11 Oct 2010 1
Standard C Library Functions ffs(3C)____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
| Standard | See standards(5). ||_____________________________|_____________________________|
SEE ALSO
attributes(5), standards(5)SunOS 5.11 Last change: 11 Oct 2010 2