Merge branch 'for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / include / asm-generic / bitops / ext2-atomic.h
CommitLineData
765f34fe
AM
1#ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
2#define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
3
148817ba
AM
4/*
5 * Spinlock based version of ext2 atomic bitops
6 */
7
765f34fe
AM
8#define ext2_set_bit_atomic(lock, nr, addr) \
9 ({ \
10 int ret; \
11 spin_lock(lock); \
c5653005 12 ret = __test_and_set_bit_le(nr, addr); \
765f34fe
AM
13 spin_unlock(lock); \
14 ret; \
15 })
16
17#define ext2_clear_bit_atomic(lock, nr, addr) \
18 ({ \
19 int ret; \
20 spin_lock(lock); \
c5653005 21 ret = __test_and_clear_bit_le(nr, addr); \
765f34fe
AM
22 spin_unlock(lock); \
23 ret; \
24 })
25
26#endif /* _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ */
This page took 0.858784 seconds and 5 git commands to generate.