}
#define AO_HAVE_double_load_full
+AO_INLINE void
+AO_double_store_full(volatile AO_double_t *addr, AO_double_t value)
+{
+ pthread_mutex_lock(&AO_pt_lock);
+ addr->AO_val1 = value.AO_val1;
+ addr->AO_val2 = value.AO_val2;
+ pthread_mutex_unlock(&AO_pt_lock);
+}
+#define AO_HAVE_double_store_full
+
AO_INLINE int
AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
AO_t old1, AO_t old2,
AO_TS_t z = AO_TS_INITIALIZER;
# endif
# if defined(AO_HAVE_double_compare_and_swapXX) \
- || defined(AO_HAVE_double_loadXX)
+ || defined(AO_HAVE_double_loadXX) \
+ || defined(AO_HAVE_double_storeXX)
AO_double_t old_w;
AO_double_t new_w;
# endif
|| !defined(AO_HAVE_double_load_read)
MISSING(AO_double_load);
# endif
+# if defined(AO_HAVE_double_storeXX)
+ new_w.AO_val1 = 1375;
+ new_w.AO_val2 = 8243;
+ AO_double_storeXX(&old_w, new_w);
+ TA_assert(old_w.AO_val1 == 1375 && old_w.AO_val2 == 8243);
+ AO_double_storeXX(&old_w, new_w);
+ TA_assert(old_w.AO_val1 == 1375 && old_w.AO_val2 == 8243);
+ new_w.AO_val1 ^= old_w.AO_val1;
+ new_w.AO_val2 ^= old_w.AO_val2;
+ AO_double_storeXX(&old_w, new_w);
+ TA_assert(old_w.AO_val1 == 0 && old_w.AO_val2 == 0);
+# elif !defined(AO_HAVE_double_store) \
+ || !defined(AO_HAVE_double_store_full) \
+ || !defined(AO_HAVE_double_store_release) \
+ || !defined(AO_HAVE_double_store_release_write) \
+ || !defined(AO_HAVE_double_store_write)
+ MISSING(AO_double_store);
+# endif
# if defined(AO_HAVE_compare_double_and_swap_doubleXX)
TA_assert(!AO_compare_double_and_swap_doubleXX(&w, 17, 42, 12, 13));
TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);