Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/bitops.h
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | #define __clear_bit(i, a) \ | ||||
atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) | atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) | ||||
#define clear_bit(i, a) \ | #define clear_bit(i, a) \ | ||||
atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) | atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) | ||||
#define test_bit(i, a) \ | #define test_bit(i, a) \ | ||||
!!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) | !!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) | ||||
static inline void | |||||
clear_bit_unlock(long bit, volatile unsigned long *var) | |||||
{ | |||||
clear_bit(bit , var); | |||||
hselasky: extra space after bit and before , | |||||
wmb(); | |||||
} | |||||
static inline int | static inline int | ||||
test_and_clear_bit(long bit, volatile unsigned long *var) | test_and_clear_bit(long bit, volatile unsigned long *var) | ||||
{ | { | ||||
long val; | long val; | ||||
var += BIT_WORD(bit); | var += BIT_WORD(bit); | ||||
bit %= BITS_PER_LONG; | bit %= BITS_PER_LONG; | ||||
bit = (1UL << bit); | bit = (1UL << bit); | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |
extra space after bit and before ,