SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
all: test_urcu test_urcu_timing test_rwlock_timing test_urcu_yield urcu-asm.S \
- urcu-asm.o
+ urcu-asm.o urcutorture urcutorture-yield
test_urcu: urcu.o test_urcu.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
urcu-asm.o: urcu-asm.c urcu.h
$(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
-#in progress...
urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
+ $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
.PHONY: clean
clean:
smp_init();
//rcu_init();
+#ifdef DEBUG_YIELD
+ yield_active |= YIELD_READ;
+ yield_active |= YIELD_WRITE;
+#endif
+
if (argc > 1) {
nreaders = strtoul(argv[1], NULL, 0);
if (argc == 2)
* Distributed under GPLv2
*/
+#define __USE_GNU
#include <stdlib.h>
/* The "volatile" is due to gcc bugs */
#ifdef DEBUG_YIELD
#include <sched.h>
+#include <time.h>
+#include <pthread.h>
#define YIELD_READ (1 << 0)
#define YIELD_WRITE (1 << 1)