23#include "../test_and_set_t_is_ao_t.h"
25#if __TARGET_ARCH_ARM < 6
26# if !defined(CPPCHECK)
27# error Do not use with ARM instruction sets lower than v6
31#define AO_ACCESS_CHECK_ALIGNED
32#define AO_ACCESS_short_CHECK_ALIGNED
33#define AO_ACCESS_int_CHECK_ALIGNED
34#include "../all_atomic_only_load.h"
36#include "../standard_ao_double_t.h"
53# ifndef AO_UNIPROCESSOR
58 mcr p15,0,dest,c7,c10,5
64#define AO_HAVE_nop_full
82 strex
tmp, value, [addr]
100#ifndef AO_PREFER_GENERALIZED
105 unsigned long one = 1;
109 strex
tmp, one, [addr]
116#define AO_HAVE_test_and_set
121 unsigned long tmp,tmp2;
135#define AO_HAVE_fetch_and_add
140 unsigned long tmp,tmp2;
154#define AO_HAVE_fetch_and_add1
159 unsigned long tmp,tmp2;
173#define AO_HAVE_fetch_and_sub1
176#ifndef AO_GENERALIZE_ASM_BOOL_CAS
191 strexeq
result, new_val, [addr]
197# define AO_HAVE_compare_and_swap
208 ldrex fetched_val, [addr]
209 teq fetched_val, old_val
213 strexeq
tmp, new_val, [addr]
219#define AO_HAVE_fetch_compare_and_swap
238 result.AO_whole = AO_load_ex(addr);
241#define AO_HAVE_double_load
254 tmp = AO_load_ex(addr);
255 if(
tmp != old_val)
return 0;
256 result = AO_store_ex(new_val1, new_val2, addr);
260#define AO_HAVE_compare_double_and_swap_double
AO_INLINE AO_double_t AO_double_load(const volatile AO_double_t *addr)
AO_INLINE int AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
AO_INLINE void AO_nop_full(void)
AO_INLINE int AO_compare_double_and_swap_double(volatile AO_double_t *addr, AO_t old_val1, AO_t old_val2, AO_t new_val1, AO_t new_val2)
#define AO_compiler_barrier()
AO_INLINE AO_t AO_fetch_and_add(volatile AO_t *p, AO_t incr)
AO_INLINE AO_t AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
AO_INLINE AO_TS_VAL_t AO_test_and_set(volatile AO_TS_t *addr)
AO_INLINE AO_t AO_fetch_and_sub1(volatile AO_t *p)
AO_INLINE AO_t AO_fetch_and_add1(volatile AO_t *p)
AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
unsigned long long double_ptr_storage