Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: f6f94e2ab1b33f0082ac22d71f66385a60d8157f authored by Linus Torvalds on 20 October 2010, 20:30:22 UTC
Linux 2.6.36
Tip revision: f6f94e2
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