summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPetter Urkedal <paurkedal@gmail.com>2011-09-24 10:20:58 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-09-30 17:35:31 +0400
commita60d2568b1a2c657c49ee2852cbed2f57568dbfa (patch)
treee9206371969c97624ca78714e589b184ed072ed0 /tests
parent1153187a8c6475dbe9290531447f203ebc9bf112 (diff)
downloadbdwgc-a60d2568b1a2c657c49ee2852cbed2f57568dbfa.tar.gz
Skip disclaim_bench.c if AO_fetch_and_add1 is missing.
Diffstat (limited to 'tests')
-rw-r--r--tests/disclaim_bench.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/disclaim_bench.c b/tests/disclaim_bench.c
index 0386ffc9..2bc37973 100644
--- a/tests/disclaim_bench.c
+++ b/tests/disclaim_bench.c
@@ -23,7 +23,14 @@
#include "atomic_ops.h"
#include "gc_disclaim.h"
-// FIXME: skip test if AO_fetch_and_add1 not available
+#ifndef AO_HAVE_fetch_and_add1
+int main(void)
+{
+ printf("Skipping disclaim_bench since we don't have AO_fetch_and_add1.\n");
+ return 0;
+}
+#else
+
static AO_t free_count = 0;
typedef struct testobj_s *testobj_t;
@@ -129,3 +136,5 @@ int main(int argc, char **argv)
model_str[model], 0.0, t, "N/A");
return 0;
}
+
+#endif /* AO_HAVE_fetch_and_add1 */