24#include "../all_aligned_atomic_load_store.h"
26#ifndef AO_ASSUME_WINDOWS98
27# define AO_ASSUME_WINDOWS98
29#ifndef AO_USE_INTERLOCKED_INTRINSICS
30# define AO_USE_INTERLOCKED_INTRINSICS
34#ifndef AO_HAVE_test_and_set_full
35# include "../test_and_set_t_is_ao_t.h"
39#ifndef AO_NO_DOUBLE_CAS
41# include "../standard_ao_double_t.h"
43# pragma intrinsic (_InterlockedCompareExchange128)
44# pragma intrinsic (_InterlockedCompareExchange128_acq)
45# pragma intrinsic (_InterlockedCompareExchange128_nf)
46# pragma intrinsic (_InterlockedCompareExchange128_rel)
53 __int64 comparandResult[2];
56 comparandResult[0] = old_val1;
57 comparandResult[1] = old_val2;
58 return _InterlockedCompareExchange128_nf((
volatile __int64 *)addr,
63# define AO_HAVE_compare_double_and_swap_double
70 __int64 comparandResult[2];
73 comparandResult[0] = old_val1;
74 comparandResult[1] = old_val2;
75 return _InterlockedCompareExchange128_acq((
volatile __int64 *)addr,
80# define AO_HAVE_compare_double_and_swap_double_acquire
87 __int64 comparandResult[2];
90 comparandResult[0] = old_val1;
91 comparandResult[1] = old_val2;
92 return _InterlockedCompareExchange128_rel((
volatile __int64 *)addr,
97# define AO_HAVE_compare_double_and_swap_double_release
104 __int64 comparandResult[2];
107 comparandResult[0] = old_val1;
108 comparandResult[1] = old_val2;
109 return _InterlockedCompareExchange128((
volatile __int64 *)addr,
114# define AO_HAVE_compare_double_and_swap_double_full
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)
AO_INLINE int AO_compare_double_and_swap_double_acquire(volatile AO_double_t *addr, AO_t old_val1, AO_t old_val2, AO_t new_val1, AO_t new_val2)
AO_INLINE int AO_compare_double_and_swap_double_release(volatile AO_double_t *addr, AO_t old_val1, AO_t old_val2, AO_t new_val1, AO_t new_val2)
#define AO_ASSERT_ADDR_ALIGNED(addr)
#define AO_compare_double_and_swap_double_full(addr, old1, old2, newval1, newval2)