Rename all data structure with prefix cds_
[urcu.git] / tests / test_urcu_lfs.c
index 02be2d4d61a75e7248e4d80f79df6066f65e76db..8335f2459f1f05533da21d5f0cc557ef815e28d9 100644 (file)
@@ -154,7 +154,7 @@ static unsigned long long __thread nr_successful_enqueues;
 static unsigned int nr_enqueuers;
 static unsigned int nr_dequeuers;
 
-static struct rcu_lfs_stack s;
+static struct cds_lfs_stack_rcu s;
 
 void *thr_enqueuer(void *_count)
 {
@@ -173,11 +173,11 @@ void *thr_enqueuer(void *_count)
        cmm_smp_mb();
 
        for (;;) {
-               struct rcu_lfs_node *node = malloc(sizeof(*node));
+               struct cds_lfs_node_rcu *node = malloc(sizeof(*node));
                if (!node)
                        goto fail;
-               rcu_lfs_node_init(node);
-               rcu_lfs_push(&s, node);
+               cds_lfs_node_init_rcu(node);
+               cds_lfs_push_rcu(&s, node);
                nr_successful_enqueues++;
 
                if (unlikely(wdelay))
@@ -218,7 +218,7 @@ void *thr_dequeuer(void *_count)
        cmm_smp_mb();
 
        for (;;) {
-               struct rcu_lfs_node *node = rcu_lfs_pop(&s);
+               struct cds_lfs_node_rcu *node = cds_lfs_pop_rcu(&s);
 
                if (node) {
                        defer_rcu(free, node);
@@ -244,12 +244,12 @@ void *thr_dequeuer(void *_count)
        return ((void*)2);
 }
 
-void test_end(struct rcu_lfs_stack *s, unsigned long long *nr_dequeues)
+void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues)
 {
-       struct rcu_lfs_node *node;
+       struct cds_lfs_node_rcu *node;
 
        do {
-               node = rcu_lfs_pop(s);
+               node = cds_lfs_pop_rcu(s);
                if (node) {
                        free(node);
                        (*nr_dequeues)++;
@@ -348,7 +348,7 @@ int main(int argc, char **argv)
        tid_dequeuer = malloc(sizeof(*tid_dequeuer) * nr_dequeuers);
        count_enqueuer = malloc(2 * sizeof(*count_enqueuer) * nr_enqueuers);
        count_dequeuer = malloc(2 * sizeof(*count_dequeuer) * nr_dequeuers);
-       rcu_lfs_init(&s);
+       cds_lfs_init_rcu(&s);
 
        next_aff = 0;
 
This page took 0.023367 seconds and 4 git commands to generate.