From: Mathieu Desnoyers Date: Thu, 1 Nov 2012 20:33:01 +0000 (-0400) Subject: Fix static linking: add missing static X-Git-Tag: v0.8.0~169 X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=bab44e28a30b837d72cb3b0cd64fe86f93e9ff61 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 --- 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;