diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2016-04-25 10:00:44 -0400 |
commit | a1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch) | |
tree | c34b2311e37ea31db153c90cb8f4570374d05e78 /linux/arch/arm/include/asm/mutex.h |
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/arch/arm/include/asm/mutex.h')
-rw-r--r-- | linux/arch/arm/include/asm/mutex.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linux/arch/arm/include/asm/mutex.h b/linux/arch/arm/include/asm/mutex.h new file mode 100644 index 00000000..87c04491 --- /dev/null +++ b/linux/arch/arm/include/asm/mutex.h @@ -0,0 +1,21 @@ +/* + * arch/arm/include/asm/mutex.h + * + * 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 +/* + * On pre-ARMv6 hardware this results in a swp-based implementation, + * 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. + */ +#if __LINUX_ARM_ARCH__ < 6 +#include <asm-generic/mutex-xchg.h> +#else +#include <asm-generic/mutex-dec.h> +#endif +#endif /* _ASM_MUTEX_H */ |