Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 72d31053f62c4bc464c2783974926969614a8649 authored by Linus Torvalds on 21 September 2008, 22:29:55 UTC
Linux 2.6.27-rc7
Tip revision: 72d3105
ext2-atomic.h
#ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
#define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_

#define ext2_set_bit_atomic(lock, nr, addr)		\
	({						\
		int ret;				\
		spin_lock(lock);			\
		ret = ext2_set_bit((nr), (unsigned long *)(addr)); \
		spin_unlock(lock);			\
		ret;					\
	})

#define ext2_clear_bit_atomic(lock, nr, addr)		\
	({						\
		int ret;				\
		spin_lock(lock);			\
		ret = ext2_clear_bit((nr), (unsigned long *)(addr)); \
		spin_unlock(lock);			\
		ret;					\
	})

#endif /* _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ */
back to top