X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_urcu.c;h=2f8cd163ee7ac7a7ac284b9d31bec7d97905e1bc;hb=94b343fd8d68512d78d8646c646c15a1b3f84186;hp=8d090ebdd070ab0fb3e64c010d91675365d48861;hpb=ec4e58a3aba2084440012f8ccac3a31eb6101183;p=urcu.git diff --git a/tests/test_urcu.c b/tests/test_urcu.c index 8d090eb..2f8cd16 100644 --- a/tests/test_urcu.c +++ b/tests/test_urcu.c @@ -32,12 +32,10 @@ #include #include #include +#include #include -/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */ -#define CACHE_LINE_SIZE 4096 - /* hardcoded number of CPUs */ #define NR_CPUS 16384 @@ -259,7 +257,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(); if (old) old->a = 0; test_array_free(old);