Cleanup: head -> node field name
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 14 Apr 2010 16:37:15 +0000 (12:37 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 14 Apr 2010 16:37:15 +0000 (12:37 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp-static.h
urcu-bp.c
urcu-qsbr-static.h
urcu-qsbr.c
urcu-static.h
urcu.c

index 933f2349a4c015dc9c77ffbabe9491cb3357a3fb..dabf4c30a00cc30dd93ee688eb1364913d8f3b26 100644 (file)
@@ -140,7 +140,7 @@ struct rcu_reader {
        /* Data used by both reader and synchronize_rcu() */
        long ctr;
        /* Data used for registry */
-       struct list_head head __attribute__((aligned(CACHE_LINE_SIZE)));
+       struct list_head node __attribute__((aligned(CACHE_LINE_SIZE)));
        pthread_t tid;
        int alloc;      /* registry entry allocated */
 };
index 3af7c3b9712879b3b74481900b5ee615cae7f8e0..b0d0d44c579d6c651a2fed0b64723ddae0a71901 100644 (file)
--- a/urcu-bp.c
+++ b/urcu-bp.c
@@ -144,9 +144,9 @@ void update_counter_and_wait(void)
         */
        for (;;) {
                wait_loops++;
-               list_for_each_entry_safe(index, tmp, &registry, head) {
+               list_for_each_entry_safe(index, tmp, &registry, node) {
                        if (!rcu_old_gp_ongoing(&index->ctr))
-                               list_move(&index->head, &qsreaders);
+                               list_move(&index->node, &qsreaders);
                }
 
                if (list_empty(&registry)) {
@@ -279,7 +279,7 @@ static void add_thread(void)
        /* Add to registry */
        rcu_reader_reg->tid = pthread_self();
        assert(rcu_reader_reg->ctr == 0);
-       list_add(&rcu_reader_reg->head, &registry);
+       list_add(&rcu_reader_reg->node, &registry);
        rcu_reader = rcu_reader_reg;
 }
 
@@ -299,7 +299,7 @@ static void rcu_gc_registry(void)
                ret = pthread_kill(tid, 0);
                assert(ret != EINVAL);
                if (ret == ESRCH) {
-                       list_del(&rcu_reader_reg->head);
+                       list_del(&rcu_reader_reg->node);
                        rcu_reader_reg->ctr = 0;
                        rcu_reader_reg->alloc = 0;
                        registry_arena.used -= sizeof(struct rcu_reader);
index 9f3a9b99f3c36ded7961cdeb3eadc102bba0f51d..8822e050bac8aaa00a8c210dfb122193f2e90280 100644 (file)
@@ -135,7 +135,7 @@ struct rcu_reader {
        /* Data used by both reader and synchronize_rcu() */
        unsigned long ctr;
        /* Data used for registry */
-       struct list_head head __attribute__((aligned(CACHE_LINE_SIZE)));
+       struct list_head node __attribute__((aligned(CACHE_LINE_SIZE)));
        pthread_t tid;
 };
 
index b043b8592e7f04f1606bd3b734b2130e09c260e9..0e1252fdbba707e4515cbbabe8c8a837a6408c79 100644 (file)
@@ -146,9 +146,9 @@ static void update_counter_and_wait(void)
                        smp_mb();
                }
 
-               list_for_each_entry_safe(index, tmp, &registry, head) {
+               list_for_each_entry_safe(index, tmp, &registry, node) {
                        if (!rcu_gp_ongoing(&index->ctr))
-                               list_move(&index->head, &qsreaders);
+                               list_move(&index->node, &qsreaders);
                }
 
                if (list_empty(&registry)) {
@@ -305,7 +305,7 @@ void rcu_register_thread(void)
        assert(rcu_reader.ctr == 0);
 
        mutex_lock(&rcu_gp_lock);
-       list_add(&rcu_reader.head, &registry);
+       list_add(&rcu_reader.node, &registry);
        mutex_unlock(&rcu_gp_lock);
        _rcu_thread_online();
 }
@@ -318,7 +318,7 @@ void rcu_unregister_thread(void)
         */
        _rcu_thread_offline();
        mutex_lock(&rcu_gp_lock);
-       list_del(&rcu_reader.head);
+       list_del(&rcu_reader.node);
        mutex_unlock(&rcu_gp_lock);
 }
 
index f68dd7c8dc1231641d040d6aeebad2a5da56970f..857d30cd729ca7b47accc94e0654807a299719a0 100644 (file)
@@ -222,7 +222,7 @@ struct rcu_reader {
        unsigned long ctr;
        char need_mb;
        /* Data used for registry */
-       struct list_head head __attribute__((aligned(CACHE_LINE_SIZE)));
+       struct list_head node __attribute__((aligned(CACHE_LINE_SIZE)));
        pthread_t tid;
 };
 
diff --git a/urcu.c b/urcu.c
index c6d7dbc9d83a011a7b7d2885f93460a268da6ea2..a3df976e3cea8fd8269d7cb3158b6e38c18fab01 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -154,7 +154,7 @@ static void force_mb_all_readers(void)
         * safe and don't assume anything : we use smp_mc() to make sure the
         * cache flush is enforced.
         */
-       list_for_each_entry(index, &registry, head) {
+       list_for_each_entry(index, &registry, node) {
                STORE_SHARED(index->need_mb, 1);
                pthread_kill(index->tid, SIGRCU);
        }
@@ -171,7 +171,7 @@ static void force_mb_all_readers(void)
         * relevant bug report.  For Linux kernels, we recommend getting
         * the Linux Test Project (LTP).
         */
-       list_for_each_entry(index, &registry, head) {
+       list_for_each_entry(index, &registry, node) {
                while (LOAD_SHARED(index->need_mb)) {
                        pthread_kill(index->tid, SIGRCU);
                        poll(NULL, 0, 1);
@@ -234,9 +234,9 @@ void update_counter_and_wait(void)
                        smp_mb_master(RCU_MB_GROUP);
                }
 
-               list_for_each_entry_safe(index, tmp, &registry, head) {
+               list_for_each_entry_safe(index, tmp, &registry, node) {
                        if (!rcu_gp_ongoing(&index->ctr))
-                               list_move(&index->head, &qsreaders);
+                               list_move(&index->node, &qsreaders);
                }
 
 #ifndef HAS_INCOHERENT_CACHES
@@ -353,14 +353,14 @@ void rcu_register_thread(void)
 
        mutex_lock(&rcu_gp_lock);
        rcu_init();     /* In case gcc does not support constructor attribute */
-       list_add(&rcu_reader.head, &registry);
+       list_add(&rcu_reader.node, &registry);
        mutex_unlock(&rcu_gp_lock);
 }
 
 void rcu_unregister_thread(void)
 {
        mutex_lock(&rcu_gp_lock);
-       list_del(&rcu_reader.head);
+       list_del(&rcu_reader.node);
        mutex_unlock(&rcu_gp_lock);
 }
 
This page took 0.029233 seconds and 4 git commands to generate.