2006-01-10 06:59:18 +07:00
|
|
|
/*
|
2008-08-02 16:55:55 +07:00
|
|
|
* arch/arm/include/asm/mutex.h
|
2006-01-10 06:59:18 +07: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-14 01:15:40 +07:00
|
|
|
* On pre-ARMv6 hardware this results in a swp-based implementation,
|
2012-08-17 00:43:04 +07: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-10 06:59:18 +07:00
|
|
|
*/
|
2012-08-17 00:43:04 +07:00
|
|
|
#if __LINUX_ARM_ARCH__ < 6
|
2012-07-14 01:15:40 +07:00
|
|
|
#include <asm-generic/mutex-xchg.h>
|
2012-08-17 00:43:04 +07:00
|
|
|
#else
|
|
|
|
#include <asm-generic/mutex-dec.h>
|
2006-01-10 06:59:18 +07:00
|
|
|
#endif
|
2012-08-17 00:43:04 +07:00
|
|
|
#endif /* _ASM_MUTEX_H */
|