[BACK]Return to ext2-atomic.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / include / asm-generic / bitops

File: [Development] / linux-2.6-xfs / include / asm-generic / bitops / ext2-atomic.h (download)

Revision 1.1, Mon May 29 16:35:25 2006 UTC (11 years, 5 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD

Merge up to 2.6.17-rc5.
Merge of 2.6.x-xfs-melb:linux:26065a by kenmcd.

#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_ */