X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_lfq.c;h=aed9be0b5214b2be94890dbace9b96dc341b3ad6;hp=87c53b6c25460b89b1837dddf5cfe3ce1fa80471;hb=06f22bdbb0c4c4d5db42a2e2dc35818aa61415be;hpb=453629a9317adef5b96c3d55e4dcd98db680997a diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index 87c53b6..aed9be0 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -77,7 +77,7 @@ static unsigned long wdelay; static inline void loop_sleep(unsigned long l) { while(l-- != 0) - cpu_relax(); + caa_cpu_relax(); } static int verbose_mode; @@ -170,7 +170,7 @@ void *thr_enqueuer(void *_count) while (!test_go) { } - smp_mb(); + cmm_smp_mb(); for (;;) { struct rcu_lfq_node *node = malloc(sizeof(*node)); @@ -202,7 +202,7 @@ fail: static void rcu_release_node(struct urcu_ref *ref) { - struct rcu_lfq_node *node = container_of(ref, struct rcu_lfq_node, ref); + struct rcu_lfq_node *node = caa_container_of(ref, struct rcu_lfq_node, ref); defer_rcu(free, node); //synchronize_rcu(); //free(node); @@ -223,7 +223,7 @@ void *thr_dequeuer(void *_count) while (!test_go) { } - smp_mb(); + cmm_smp_mb(); for (;;) { struct rcu_lfq_node *node = rcu_lfq_dequeue(&q, @@ -255,7 +255,7 @@ void *thr_dequeuer(void *_count) static void release_node(struct urcu_ref *ref) { - struct rcu_lfq_node *node = container_of(ref, struct rcu_lfq_node, ref); + struct rcu_lfq_node *node = caa_container_of(ref, struct rcu_lfq_node, ref); free(node); } @@ -380,7 +380,7 @@ int main(int argc, char **argv) exit(1); } - smp_mb(); + cmm_smp_mb(); test_go = 1;