Statistics
| Branch: | Revision:

iof-bird-daemon / lib / bitops.h @ 18c8241a

History | View | Annotate | Download (469 Bytes)

1
/*
2
 *        BIRD Library -- Generic Bit Operations
3
 *
4
 *        (c) 1998 Martin Mares <mj@ucw.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
/*
10
 *        Bit mask operations:
11
 *
12
 *        u32_mkmask        Make bit mask consisting of <n> consecutive ones
13
 *                        from the left and the rest filled with zeroes.
14
 *                        E.g., u32_mkmask(5) = 0xf8000000.
15
 *        u32_masklen        Inverse operation to u32_mkmask, -1 if not a bitmask.
16
 */
17

    
18
u32 u32_mkmask(unsigned);
19
int u32_masklen(u32);