0001
0002 #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
0003 #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
0004
0005
0006
0007
0008
0009 #define ext2_set_bit_atomic(lock, nr, addr) \
0010 ({ \
0011 int ret; \
0012 spin_lock(lock); \
0013 ret = __test_and_set_bit_le(nr, addr); \
0014 spin_unlock(lock); \
0015 ret; \
0016 })
0017
0018 #define ext2_clear_bit_atomic(lock, nr, addr) \
0019 ({ \
0020 int ret; \
0021 spin_lock(lock); \
0022 ret = __test_and_clear_bit_le(nr, addr); \
0023 spin_unlock(lock); \
0024 ret; \
0025 })
0026
0027 #endif