summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8a95362)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
all: test_urcu test_urcu_timing test_rwlock_timing test_urcu_yield urcu-asm.S \
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 urcutorture urcutorture-yield
test_urcu: urcu.o test_urcu.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
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)
urcu-asm.o: urcu-asm.c urcu.h
$(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
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)
+
smp_init();
//rcu_init();
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)
if (argc > 1) {
nreaders = strtoul(argv[1], NULL, 0);
if (argc == 2)
* Distributed under GPLv2
*/
* Distributed under GPLv2
*/
#include <stdlib.h>
/* The "volatile" is due to gcc bugs */
#include <stdlib.h>
/* The "volatile" is due to gcc bugs */
#ifdef DEBUG_YIELD
#include <sched.h>
#ifdef DEBUG_YIELD
#include <sched.h>
+#include <time.h>
+#include <pthread.h>
#define YIELD_READ (1 << 0)
#define YIELD_WRITE (1 << 1)
#define YIELD_READ (1 << 0)
#define YIELD_WRITE (1 << 1)
#include <poll.h>
#include <unistd.h>
#include <stdlib.h>
#include <poll.h>
#include <unistd.h>
#include <stdlib.h>