]> granicus.if.org Git - libatomic_ops/commitdiff
tests: Add and/or/xor entries to list_atomic
authorIvan Maidanski <ivmai@mail.ru>
Sun, 11 Aug 2013 10:57:35 +0000 (14:57 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 11 Aug 2013 10:58:07 +0000 (14:58 +0400)
* tests/list_atomic.template (list_atomicXX): Add AO_XSIZE_andXX,
AO_XSIZE_orXX, AO_XSIZE_xorXX invocations.

tests/list_atomic.template

index 8817c6ec8f36771d218b9bc133b6f4c649540461..5a07b2a48b5624726165dc5657175abbeb4c0c42 100644 (file)
@@ -26,7 +26,8 @@ void XSIZE_list_atomicXX(void)
 # if defined(AO_HAVE_test_and_setXX)
     AO_TS_t ts;
 # endif
-# if defined(AO_HAVE_XSIZE_fetch_and_addXX)
+# if defined(AO_HAVE_XSIZE_fetch_and_addXX) || defined(AO_HAVE_XSIZE_andXX) \
+     || defined(AO_HAVE_XSIZE_orXX) || defined(AO_HAVE_XSIZE_xorXX)
     static XCTYPE incr /* = 0 */;
 # endif
 
@@ -67,12 +68,32 @@ void XSIZE_list_atomicXX(void)
 # else
     (void)"No AO_XSIZE_fetch_and_sub1XX";
 # endif
+# ifdef AO_HAVE_XSIZE_andXX
+    (void)"AO_XSIZE_andXX(&val, incr):";
+    AO_XSIZE_andXX(&val, incr);
+# else
+    (void)"No AO_XSIZE_andXX";
+# endif
+# ifdef AO_HAVE_XSIZE_orXX
+    (void)"AO_XSIZE_orXX(&val, incr):";
+    AO_XSIZE_orXX(&val, incr);
+# else
+    (void)"No AO_XSIZE_orXX";
+# endif
+# ifdef AO_HAVE_XSIZE_xorXX
+    (void)"AO_XSIZE_xorXX(&val, incr):";
+    AO_XSIZE_xorXX(&val, incr);
+# else
+    (void)"No AO_XSIZE_xorXX";
+# 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);
 # else
     (void)"No AO_XSIZE_compare_and_swapXX";
 # endif
+  /* TODO: Add AO_compare_double_and_swap_doubleXX */
+  /* 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);