implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / libatomic_ops / tests / list_atomic.template
diff --git a/gc-7.2/libatomic_ops/tests/list_atomic.template b/gc-7.2/libatomic_ops/tests/list_atomic.template
new file mode 100644 (file)
index 0000000..958e44f
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be   */
+/* be used only with cc -E, to inspect the expensions generated by      */
+/* primitives.                                                          */
+
+/* The result will not link or run.                                     */
+
+void list_atomicXX(void)
+{
+  AO_T val, newval = 0, oldval = 0;
+  AO_TS_T ts;
+  long incr = 0;
+
+# if defined(AO_HAVE_nopXX)
+    "AO_nopXX(): ";
+    AO_nopXX();
+# else
+    "No AO_nopXX";
+# endif
+# if defined(AO_HAVE_loadXX)
+    "AO_loadXX(&val):";
+    AO_loadXX(&val);
+# else
+    "No AO_loadXX";
+# endif
+# if defined(AO_HAVE_storeXX)
+    "AO_storeXX(&val, newval):";
+    AO_storeXX(&val, newval);
+# else
+    "No AO_storeXX";
+# endif
+# if defined(AO_HAVE_test_and_setXX)
+    "AO_test_and_setXX(&ts):";
+    AO_test_and_setXX(&ts);
+# else
+    "No AO_test_and_setXX";
+# endif
+# if defined(AO_HAVE_fetch_and_add1XX)
+    "AO_fetch_and_add1XX(&val):";
+    AO_fetch_and_add1XX(&val);
+# else
+    "No AO_fetch_and_add1XX";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1XX)
+    "AO_fetch_and_sub1XX(&val):";
+    AO_fetch_and_sub1XX(&val);
+# else
+    "No AO_fetch_and_sub1XX";
+# endif
+# if defined(AO_HAVE_fetch_and_addXX)
+    "AO_fetch_and_addXX(&val, incr):";
+    AO_fetch_and_addXX(&val, incr);
+# else
+    "No AO_fetch_and_addXX";
+# endif
+# if defined(AO_HAVE_compare_and_swapXX)
+    "AO_compare_and_swapXX(&val, oldval, newval):";
+    AO_compare_and_swapXX(&val, oldval, newval);
+# else
+    "No AO_compare_and_swapXX";
+# endif
+}