Fix static linking: add missing static
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Nov 2012 20:33:01 +0000 (16:33 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Nov 2012 20:33:01 +0000 (16:33 -0400)
update_counter_and_wait and call_rcu_data_list are only used locally.
Add the static keyword to ensure their symbol are not exported. This
helps fixing static linking of many URCU flavors into the same program.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp.c
urcu-call-rcu-impl.h
urcu.c

index 860421a9713e49050f167f1f9af2ce28085fe88d..5dccbcd33c084032c9562b05ef9812404022ff9a 100644 (file)
--- a/urcu-bp.c
+++ b/urcu-bp.c
@@ -164,7 +164,7 @@ static void mutex_unlock(pthread_mutex_t *mutex)
                urcu_die(ret);
 }
 
-void update_counter_and_wait(void)
+static void update_counter_and_wait(void)
 {
        CDS_LIST_HEAD(qsreaders);
        int wait_loops = 0;
index 61aeee611a04da3c78083437bd6af48cbde8d366..5dfdb9277b5a351f62d09ee7b534f94c0a4ca3b5 100644 (file)
@@ -69,7 +69,7 @@ struct call_rcu_data {
  * Protected by call_rcu_mutex.
  */
 
-CDS_LIST_HEAD(call_rcu_data_list);
+static CDS_LIST_HEAD(call_rcu_data_list);
 
 /* Link a thread using call_rcu() to its call_rcu thread. */
 
diff --git a/urcu.c b/urcu.c
index 10ea7de09efe54ff96800aae4019d7198a9efa24..42a5829fb894f513db3cae9f59f832e24ae0ca26 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -215,7 +215,7 @@ static void wait_gp(void)
                      NULL, NULL, 0);
 }
 
-void update_counter_and_wait(void)
+static void update_counter_and_wait(void)
 {
        CDS_LIST_HEAD(qsreaders);
        int wait_loops = 0;
This page took 0.025984 seconds and 4 git commands to generate.