/* The result will not link or run. */
+#include <stdlib.h> /* for exit() */
+
void XSIZE_list_atomicXX(void)
{
# if defined(AO_HAVE_XSIZE_loadXX) || defined(AO_HAVE_XSIZE_storeXX) \
# ifdef AO_HAVE_XSIZE_loadXX
(void)"AO_XSIZE_loadXX(&val):";
- AO_XSIZE_loadXX(&val);
+ (void)AO_XSIZE_loadXX(&val);
# else
(void)"No AO_XSIZE_loadXX";
# endif
# endif
# ifdef AO_HAVE_XSIZE_fetch_and_addXX
(void)"AO_XSIZE_fetch_and_addXX(&val, incr):";
- AO_XSIZE_fetch_and_addXX(&val, incr);
+ (void)AO_XSIZE_fetch_and_addXX(&val, incr);
# else
(void)"No AO_XSIZE_fetch_and_addXX";
# endif
# ifdef AO_HAVE_XSIZE_fetch_and_add1XX
(void)"AO_XSIZE_fetch_and_add1XX(&val):";
- AO_XSIZE_fetch_and_add1XX(&val);
+ (void)AO_XSIZE_fetch_and_add1XX(&val);
# else
(void)"No AO_XSIZE_fetch_and_add1XX";
# endif
# ifdef AO_HAVE_XSIZE_fetch_and_sub1XX
(void)"AO_XSIZE_fetch_and_sub1XX(&val):";
- AO_XSIZE_fetch_and_sub1XX(&val);
+ (void)AO_XSIZE_fetch_and_sub1XX(&val);
# else
(void)"No AO_XSIZE_fetch_and_sub1XX";
# endif
# endif
# ifdef AO_HAVE_XSIZE_compare_and_swapXX
(void)"AO_XSIZE_compare_and_swapXX(&val, oldval, newval):";
- AO_XSIZE_compare_and_swapXX(&val, oldval, newval);
+ if (!AO_XSIZE_compare_and_swapXX(&val, oldval, newval))
+ exit(1);
# else
(void)"No AO_XSIZE_compare_and_swapXX";
# endif
/* TODO: Add AO_compare_and_swap_doubleXX */
# ifdef AO_HAVE_XSIZE_fetch_compare_and_swapXX
(void)"AO_XSIZE_fetch_compare_and_swapXX(&val, oldval, newval):";
- AO_XSIZE_fetch_compare_and_swapXX(&val, oldval, newval);
+ if (AO_XSIZE_fetch_compare_and_swapXX(&val, oldval, newval) != oldval)
+ exit(1);
# else
(void)"No AO_XSIZE_fetch_compare_and_swapXX";
# endif
# if defined(AO_HAVE_test_and_setXX)
(void)"AO_test_and_setXX(&ts):";
- AO_test_and_setXX(&ts);
+ (void)AO_test_and_setXX(&ts);
# else
(void)"No AO_test_and_setXX";
# endif