2006-01-09 23:59:18 +00:00
|
|
|
/*
|
2008-08-02 09:55:55 +00:00
|
|
|
* arch/arm/include/asm/mutex.h
|
2006-01-09 23:59:18 +00:00
|
|
|
*
|
|
|
|
* ARM optimized mutex locking primitives
|
|
|
|
*
|
|
|
|
* Please look into asm-generic/mutex-xchg.h for a formal definition.
|
|
|
|
*/
|
|
|
|
#ifndef _ASM_MUTEX_H
|
|
|
|
#define _ASM_MUTEX_H
|
|
|
|
/*
|
2012-07-13 18:15:40 +00:00
|
|
|
* On pre-ARMv6 hardware this results in a swp-based implementation,
|
2012-08-16 17:43:04 +00:00
|
|
|
* which is the most efficient. For ARMv6+, we have exclusive memory
|
|
|
|
* accessors and use atomic_dec to avoid the extra xchg operations
|
|
|
|
* on the locking slowpaths.
|
2006-01-09 23:59:18 +00:00
|
|
|
*/
|
2012-08-16 17:43:04 +00:00
|
|
|
#if __LINUX_ARM_ARCH__ < 6
|
2012-07-13 18:15:40 +00:00
|
|
|
#include <asm-generic/mutex-xchg.h>
|
2012-08-16 17:43:04 +00:00
|
|
|
#else
|
|
|
|
#include <asm-generic/mutex-dec.h>
|
2006-01-09 23:59:18 +00:00
|
|
|
#endif
|
2012-08-16 17:43:04 +00:00
|
|
|
#endif /* _ASM_MUTEX_H */
|