From bab44e28a30b837d72cb3b0cd64fe86f93e9ff61 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 1 Nov 2012 16:33:01 -0400 Subject: [PATCH] Fix static linking: add missing static 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 --- urcu-bp.c | 2 +- urcu-call-rcu-impl.h | 2 +- urcu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/urcu-bp.c b/urcu-bp.c index 860421a..5dccbcd 100644 --- 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; diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index 61aeee6..5dfdb92 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -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 10ea7de..42a5829 100644 --- 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; -- 2.34.1