X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=src%2Furcu-qsbr.c;h=6ff933af4c6e1ef482c9b73b5acd133f23f41e84;hp=346748b2176dfe9fb2917a1769cdc28483da9b19;hb=ce28e67a534dcf0b68ccad2218e5a2e552e6e469;hpb=4477a87021ffbfbfdb2a2084d05a084171343d36 diff --git a/src/urcu-qsbr.c b/src/urcu-qsbr.c index 346748b..6ff933a 100644 --- a/src/urcu-qsbr.c +++ b/src/urcu-qsbr.c @@ -43,6 +43,7 @@ #include "urcu-die.h" #include "urcu-wait.h" +#include "urcu-utils.h" #define URCU_API_MAP /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ @@ -68,7 +69,7 @@ static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER; */ static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER; struct urcu_gp urcu_qsbr_gp = { .ctr = URCU_QSBR_GP_ONLINE }; -__attribute__((alias("urcu_qsbr_gp"))) extern struct urcu_gp rcu_gp_qsbr; +URCU_ATTR_ALIAS("urcu_qsbr_gp") extern struct urcu_gp rcu_gp_qsbr; /* * Active attempts to check for reader Q.S. before calling futex(). @@ -80,7 +81,7 @@ __attribute__((alias("urcu_qsbr_gp"))) extern struct urcu_gp rcu_gp_qsbr; * writers. */ DEFINE_URCU_TLS(struct urcu_qsbr_reader, urcu_qsbr_reader); -__attribute__((alias("urcu_qsbr_reader"))) +URCU_ATTR_ALIAS("urcu_qsbr_reader") extern struct urcu_qsbr_reader rcu_reader_qsbr; static CDS_LIST_HEAD(registry); @@ -430,7 +431,7 @@ gp_end: cmm_smp_mb(); } #endif /* !(CAA_BITS_PER_LONG < 64) */ -__attribute__((alias("urcu_qsbr_synchronize_rcu"))) +URCU_ATTR_ALIAS("urcu_qsbr_synchronize_rcu") void synchronize_rcu_qsbr(); /* @@ -441,40 +442,40 @@ void urcu_qsbr_read_lock(void) { _urcu_qsbr_read_lock(); } -__attribute__((alias("urcu_qsbr_read_lock"))) void rcu_read_lock_qsbr(); +URCU_ATTR_ALIAS("urcu_qsbr_read_lock") void rcu_read_lock_qsbr(); void urcu_qsbr_read_unlock(void) { _urcu_qsbr_read_unlock(); } -__attribute__((alias("urcu_qsbr_read_unlock"))) void rcu_read_unlock_qsbr(); +URCU_ATTR_ALIAS("urcu_qsbr_read_unlock") void rcu_read_unlock_qsbr(); int urcu_qsbr_read_ongoing(void) { return _urcu_qsbr_read_ongoing(); } -__attribute__((alias("urcu_qsbr_read_ongoing"))) +URCU_ATTR_ALIAS("urcu_qsbr_read_ongoing") void rcu_read_ongoing_qsbr(); void urcu_qsbr_quiescent_state(void) { _urcu_qsbr_quiescent_state(); } -__attribute__((alias("urcu_qsbr_quiescent_state"))) +URCU_ATTR_ALIAS("urcu_qsbr_quiescent_state") void rcu_quiescent_state_qsbr(); void urcu_qsbr_thread_offline(void) { _urcu_qsbr_thread_offline(); } -__attribute__((alias("urcu_qsbr_thread_offline"))) +URCU_ATTR_ALIAS("urcu_qsbr_thread_offline") void rcu_thread_offline_qsbr(); void urcu_qsbr_thread_online(void) { _urcu_qsbr_thread_online(); } -__attribute__((alias("urcu_qsbr_thread_online"))) +URCU_ATTR_ALIAS("urcu_qsbr_thread_online") void rcu_thread_online_qsbr(); void urcu_qsbr_register_thread(void) @@ -489,7 +490,7 @@ void urcu_qsbr_register_thread(void) mutex_unlock(&rcu_registry_lock); _urcu_qsbr_thread_online(); } -__attribute__((alias("urcu_qsbr_register_thread"))) +URCU_ATTR_ALIAS("urcu_qsbr_register_thread") void rcu_register_thread_qsbr(); void urcu_qsbr_unregister_thread(void) @@ -505,7 +506,7 @@ void urcu_qsbr_unregister_thread(void) cds_list_del(&URCU_TLS(urcu_qsbr_reader).node); mutex_unlock(&rcu_registry_lock); } -__attribute__((alias("urcu_qsbr_unregister_thread"))) +URCU_ATTR_ALIAS("urcu_qsbr_unregister_thread") void rcu_unregister_thread_qsbr(); void urcu_qsbr_exit(void) @@ -516,7 +517,7 @@ void urcu_qsbr_exit(void) * assert(cds_list_empty(®istry)); */ } -__attribute__((alias("urcu_qsbr_exit"))) void rcu_exit_qsbr(); +URCU_ATTR_ALIAS("urcu_qsbr_exit") void rcu_exit_qsbr(); DEFINE_RCU_FLAVOR(rcu_flavor); DEFINE_RCU_FLAVOR_ALIAS(rcu_flavor, alias_rcu_flavor);