From: Mathieu Desnoyers Date: Tue, 9 Jun 2009 18:15:56 +0000 (-0400) Subject: Add mb urcu flavor test X-Git-Tag: v0.1~184 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=e90a6e9c5510e5dad2e3f3e8530eeba242c0a91d Add mb urcu flavor test Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index aa6d710..1455680 100644 --- 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 b71e162..7f3de52 100644 --- a/urcu.c +++ b/urcu.c @@ -36,8 +36,14 @@ /* 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;