X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Frcutorture.h;h=712d59df669c54d564b21d2a18b5f75c71a17372;hb=3644b3ee9ca6a858cf733579012ef595d652dcdf;hp=00b0b316b736c181aa3270d45a78b5403637db87;hpb=833dbdb633ba44bfb71b4b965a83096d8e4e827b;p=urcu.git diff --git a/tests/rcutorture.h b/tests/rcutorture.h index 00b0b31..712d59d 100644 --- a/tests/rcutorture.h +++ b/tests/rcutorture.h @@ -70,7 +70,7 @@ DEFINE_PER_THREAD(long long, n_updates_pt); long long n_reads = 0LL; long n_updates = 0L; -atomic_t nthreadsrunning; +int nthreadsrunning; char argsbuf[64]; #define GOFLAG_INIT 0 @@ -116,7 +116,7 @@ void *rcu_read_perf_test(void *arg) rcu_register_thread(); run_on(me); - atomic_inc(&nthreadsrunning); + uatomic_inc(&nthreadsrunning); while (goflag == GOFLAG_INIT) poll(NULL, 0, 1); mark_rcu_quiescent_state(); @@ -141,7 +141,7 @@ void *rcu_update_perf_test(void *arg) { long long n_updates_local = 0; - atomic_inc(&nthreadsrunning); + uatomic_inc(&nthreadsrunning); while (goflag == GOFLAG_INIT) poll(NULL, 0, 1); while (goflag == GOFLAG_RUN) { @@ -156,7 +156,7 @@ void perftestinit(void) { init_per_thread(n_reads_pt, 0LL); init_per_thread(n_updates_pt, 0LL); - atomic_set(&nthreadsrunning, 0); + uatomic_set(&nthreadsrunning, 0); } void perftestrun(int nthreads, int nreaders, int nupdaters) @@ -165,7 +165,7 @@ void perftestrun(int nthreads, int nreaders, int nupdaters) int duration = 1; smp_mb(); - while (atomic_read(&nthreadsrunning) < nthreads) + while (uatomic_read(&nthreadsrunning) < nthreads) poll(NULL, 0, 1); goflag = GOFLAG_RUN; smp_mb();