X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_qsbr.c;h=d6c4d1aed017420666da1ad68562542f151b6d80;hb=d45599f4bfd3283dbab0f023d051b9b9b0639c0d;hp=43797716bcaff18fc1a8c9d6eb2fffe2bc3d6e95;hpb=7ac06cef7a7d9394332837edc5c0e9595286a5fc;p=urcu.git diff --git a/tests/test_qsbr.c b/tests/test_qsbr.c index 4379771..d6c4d1a 100644 --- a/tests/test_qsbr.c +++ b/tests/test_qsbr.c @@ -33,10 +33,7 @@ #include #include -#include "../arch.h" - -/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */ -#define CACHE_LINE_SIZE 4096 +#include /* hardcoded number of CPUs */ #define NR_CPUS 16384 @@ -61,7 +58,7 @@ static inline pid_t gettid(void) #else #define debug_yield_read() #endif -#include "../urcu-qsbr.h" +#include "urcu-qsbr.h" struct test_array { int a; @@ -262,7 +259,8 @@ void *thr_writer(void *_count) for (;;) { new = test_array_alloc(); new->a = 8; - old = rcu_publish_content(&test_rcu_pointer, new); + old = rcu_xchg_pointer(&test_rcu_pointer, new); + synchronize_rcu(); /* can be done after unlock */ if (old) old->a = 0;