Manual Page Result
0
Command: ffs | Section: 9 | Source: OpenBSD | File: ffs.9
FFS(9) FreeBSD Kernel Developer's Manual FFS(9)
NAME
ffs, fls, flsl - kernel library find bit routines
SYNOPSIS
#include <lib/libkern/libkern.h>
int
ffs(int value);
int
fls(int value);
int
flsl(long value);
DESCRIPTION
The ffs() function finds the first bit set in value. It has the same
semantics as its libc counterpart ffs(3).
The fls() and flsl() functions find the last bit set in value and return
the index of that bit.
SEE ALSO
ffs(3)
STANDARDS
The ffs() function conforms to IEEE Std 1003.1-2008 ("POSIX.1").
HISTORY
The ffs() function is based on a vax instruction of the same name.
FreeBSD 14.1-RELEASE-p8 September 10, 2022 FreeBSD 14.1-RELEASE-p8