1BITMAP_ORD_TO_POS(9)    Basic Kernel Library Functions    BITMAP_ORD_TO_POS(9)
2
3
4

NAME

6       bitmap_ord_to_pos -
7

SYNOPSIS

9       int bitmap_ord_to_pos(const unsigned long * buf, int ord, int bits);
10

ARGUMENTS

12       buf
13           pointer to bitmap
14
15       ord
16           ordinal bit position (n-th set bit, n >= 0)
17
18       bits
19           number of valid bit positions in buf
20

DESCRIPTION

22       Map the ordinal offset of bit ord in buf to its position in buf. Value
23       of ord should be in range 0 <= ord < weight(buf), else results are
24       undefined.
25
26       If for example, just bits 4 through 7 are set in buf, then ord values 0
27       through 3 will get mapped to 4 through 7, respectively, and all other
28       ord values return undefined values. When ord value 3 gets mapped to
29       (returns) pos value 7 in this example, that means that the 3rd set bit
30       (starting with 0th) is at position 7 in buf.
31
32       The bit positions 0 through bits are valid positions in buf.
33
35Kernel Hackers Manual 2.6.         June 2019              BITMAP_ORD_TO_POS(9)
Impressum