1ffs(3C)                  Standard C Library Functions                  ffs(3C)
2
3
4

NAME

6       ffs - find first set bit
7

SYNOPSIS

9       #include <strings.h>
10
11       int ffs(const int i);
12
13

DESCRIPTION

15       The  ffs()  function  finds the first bit set (beginning with the least
16       significant bit) and returns the index of that bit.  Bits are  numbered
17       starting at one (the least significant bit).
18

RETURN VALUES

20       The  ffs() function returns the index of the first bit set.  If i is 0,
21       then ffs() returns 0.
22

ERRORS

24       No errors are defined.
25

ATTRIBUTES

27       See attributes(5) for descriptions of the following attributes:
28
29
30
31
32       ┌─────────────────────────────┬─────────────────────────────┐
33       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
34       ├─────────────────────────────┼─────────────────────────────┤
35       │Interface Stability          │Standard                     │
36       ├─────────────────────────────┼─────────────────────────────┤
37       │MT-Level                     │MT-Safe                      │
38       └─────────────────────────────┴─────────────────────────────┘
39

SEE ALSO

41       attributes(5), standards(5)
42
43
44
45SunOS 5.11                        24 Jul 2002                          ffs(3C)
Impressum