4 inline int test_bit(u8
* buf
, u64 offset
)
6 return buf
[offset
>> 3] & (1<<(offset
& 7));
9 inline void init_bit(u8
* buf
, u64 offset
, int value
)
11 int mask
= ((value
& 1) << (offset
& 7));
12 buf
[offset
>> 3] &= ~mask
;
13 buf
[offset
>> 3] |= mask
;
16 inline void clear_bit(u8
* buf
, u64 offset
)
18 buf
[offset
>> 3] &= ~(1 << (offset
& 7));
21 inline void set_bit(u8
* buf
, u64 offset
)
23 buf
[offset
>> 3] |= 1 << (offset
& 7);