test_perthreadlock test_urcu_yield test_urcu_mb \
urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
urcutorture-yield liburcu.so test_mutex test_looplen test_urcu_gc \
- test_urcu_gc_mb test_qsbr_gc
+ test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
+ test_urcu_lgc_mb
checkarch:
ifeq (${ARCHTYPE},)
test_urcu_gc_mb: urcu-mb.o test_urcu_gc.c urcu.h
$(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_urcu_lgc: urcu.o test_urcu_gc.c urcu.h
+ $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_urcu_lgc_mb: urcu-mb.o test_urcu_gc.c urcu.h
+ $(CC) -DTEST_LOCAL_GC -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)
test_qsbr_gc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_qsbr_lgc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
+ $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
test_rwlock: urcu.o test_rwlock.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
test_perthreadlock test_urcu_yield test_urcu_mb \
urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
urcutorture-yield liburcu.so test_mutex test_looplen test_urcu_gc \
- test_urcu_gc_mb test_qsbr_gc
+ test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
+ test_urcu_lgc_mb
checkarch:
ifeq (${ARCHTYPE},)
test_urcu_gc_mb: urcu-mb.o test_urcu_gc.c urcu.h
$(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_urcu_lgc: urcu.o test_urcu_gc.c urcu.h
+ $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_urcu_lgc_mb: urcu-mb.o test_urcu_gc.c urcu.h
+ $(CC) -DTEST_LOCAL_GC -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)
test_qsbr_gc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_qsbr_lgc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
+ $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
test_rwlock: urcu.o test_rwlock.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
#!/bin/sh
for a in test_urcu_gc test_urcu_gc_mb test_urcu test_urcu_mb \
+ test_urcu_lgc test_qsbr_lgc test_urcu_lgc_mb \
test_qsbr test_qsbr_gc test_rwlock test_perthreadlock \
test_mutex; do
echo "./${a} $*" | tee -a runall.detail.log
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
+#ifdef TEST_LOCAL_GC
+ struct test_array *old = NULL;
+#else
struct test_array *new, *old;
+#endif
printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
"writer", pthread_self(), (unsigned long)gettid());
smp_mb();
for (;;) {
+#ifndef TEST_LOCAL_GC
new = malloc(sizeof(*new));
new->a = 8;
old = _rcu_xchg_pointer(&test_rcu_pointer, new);
+#endif
rcu_gc_reclaim(wtidx, old);
nr_writes++;
if (unlikely(!test_duration_write()))
void *thr_writer(void *data)
{
unsigned long wtidx = (unsigned long)data;
+#ifdef TEST_LOCAL_GC
+ struct test_array *old = NULL;
+#else
struct test_array *new, *old;
+#endif
printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
"writer", pthread_self(), (unsigned long)gettid());
smp_mb();
for (;;) {
+#ifndef TEST_LOCAL_GC
new = malloc(sizeof(*new));
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
+#endif
rcu_gc_reclaim(wtidx, old);
nr_writes++;
if (unlikely(!test_duration_write()))