Add mb urcu flavor test
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 9 Jun 2009 18:15:56 +0000 (14:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 9 Jun 2009 18:15:56 +0000 (14:15 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Makefile
urcu.c

index aa6d7100eeeda43f72653d924eedb71d2ee4fd34..145568026463bd24f01595e346b5749a07f679e8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
 
 all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
        test_rwlock_timing test_rwlock test_perthreadlock_timing \
-       test_perthreadlock test_urcu_yield \
+       test_perthreadlock test_urcu_yield test_urcu_mb \
        urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
        urcutorture-yield liburcu.so
 
@@ -35,6 +35,9 @@ pthreads-ppc: clean
 test_urcu: urcu.o test_urcu.c urcu.h
        $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
 
+test_urcu_mb: urcu-mb.o test_urcu.c urcu.h
+       $(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
 test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
        $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
 
@@ -65,6 +68,9 @@ test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
 urcu.o: urcu.c urcu.h
        $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
 
+urcu-mb.o: urcu.c urcu.h
+       $(CC) -fPIC -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
+
 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
        $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
 
diff --git a/urcu.c b/urcu.c
index b71e162b3fca1e29f83e02b6cd405e68b154147e..7f3de52c4857d9dd6da70536de8b9cf2b73720f7 100644 (file)
--- a/urcu.c
+++ b/urcu.c
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #include "urcu.h"
 
+#ifndef DEBUG_FULL_MB
 void __attribute__((constructor)) urcu_init(void);
 void __attribute__((destructor)) urcu_exit(void);
+#else
+static inline urcu_init(void)
+{
+}
+#endif
 
 int init_done;
 
This page took 0.026149 seconds and 4 git commands to generate.