Use atomic_clear_rel_long() to implement clear_bit_unlock() in the LinuxKPI
after r363842. Suggested by: alc@ MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
6ae240797f
commit
74d3a63559
@ -272,16 +272,12 @@ find_next_zero_bit(const unsigned long *addr, unsigned long size,
|
||||
#define clear_bit(i, a) \
|
||||
atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i))
|
||||
|
||||
#define clear_bit_unlock(i, a) \
|
||||
atomic_clear_rel_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i))
|
||||
|
||||
#define test_bit(i, a) \
|
||||
!!(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);
|
||||
wmb();
|
||||
}
|
||||
|
||||
static inline int
|
||||
test_and_clear_bit(long bit, volatile unsigned long *var)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user