From: Michael Jeanson Date: Tue, 1 Jun 2021 20:32:24 +0000 (-0400) Subject: Remove all SONAME(6) ABI aliases X-Git-Tag: v0.13.0~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a0ec6d9b6b67e37fc81c98e04008907bc500cde8;p=userspace-rcu.git Remove all SONAME(6) ABI aliases Those aliases become unneeded with the upcoming soname bump. Change-Id: Id6c368526d9cb04fc92c12b3f4632b4a9443f41d Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/urcu/flavor.h b/include/urcu/flavor.h index 93da38f..1a92089 100644 --- a/include/urcu/flavor.h +++ b/include/urcu/flavor.h @@ -78,15 +78,6 @@ const struct rcu_flavor_struct x = { \ .unregister_rculfhash_atfork = urcu_unregister_rculfhash_atfork,\ } -#define DEFINE_RCU_FLAVOR_ALIAS(x, y) _DEFINE_RCU_FLAVOR_ALIAS(x, y) -#ifdef __APPLE__ -#define _DEFINE_RCU_FLAVOR_ALIAS(x, y) -#else -#define _DEFINE_RCU_FLAVOR_ALIAS(x, y) \ -__attribute__((alias(#x))) \ -extern const struct rcu_flavor_struct y; -#endif - extern const struct rcu_flavor_struct rcu_flavor; #ifdef __cplusplus diff --git a/include/urcu/map/clear.h b/include/urcu/map/clear.h index 76d5464..8aff778 100644 --- a/include/urcu/map/clear.h +++ b/include/urcu/map/clear.h @@ -76,48 +76,3 @@ #undef urcu_register_rculfhash_atfork #undef urcu_unregister_rculfhash_atfork - -/* Aliases for ABI(6) compat */ - -#undef alias_rcu_flavor - -/* src/urcu.c */ -#undef alias_rcu_read_lock -#undef alias_rcu_read_unlock -#undef alias_rcu_read_ongoing -#undef alias_rcu_register_thread -#undef alias_rcu_unregister_thread -#undef alias_rcu_init -#undef alias_rcu_exit -#undef alias_synchronize_rcu -#undef alias_rcu_reader -#undef alias_rcu_gp - -/* src/urcu-call-rcu-impl.h */ -#undef alias_get_cpu_call_rcu_data -#undef alias_get_call_rcu_thread -#undef alias_create_call_rcu_data -#undef alias_set_cpu_call_rcu_data -#undef alias_get_default_call_rcu_data -#undef alias_get_call_rcu_data -#undef alias_get_thread_call_rcu_data -#undef alias_set_thread_call_rcu_data -#undef alias_create_all_cpu_call_rcu_data -#undef alias_free_all_cpu_call_rcu_data -#undef alias_call_rcu -#undef alias_call_rcu_data_free -#undef alias_call_rcu_before_fork -#undef alias_call_rcu_after_fork_parent -#undef alias_call_rcu_after_fork_child -#undef alias_rcu_barrier - -#undef alias_urcu_register_rculfhash_atfork -#undef alias_urcu_unregister_rculfhash_atfork - -/* src/urcu-defer-impl.h */ -#undef alias_defer_rcu -#undef alias_rcu_defer_register_thread -#undef alias_rcu_defer_unregister_thread -#undef alias_rcu_defer_barrier -#undef alias_rcu_defer_barrier_thread -#undef alias_rcu_defer_exit diff --git a/include/urcu/map/urcu-bp.h b/include/urcu/map/urcu-bp.h index a80005f..6f0a15a 100644 --- a/include/urcu/map/urcu-bp.h +++ b/include/urcu/map/urcu-bp.h @@ -84,44 +84,6 @@ urcu_bp_unregister_rculfhash_atfork -/* Aliases for ABI(6) compat */ - -#define alias_rcu_flavor rcu_flavor_bp - -#define alias_get_cpu_call_rcu_data get_cpu_call_rcu_data_bp -#define alias_get_call_rcu_thread get_call_rcu_thread_bp -#define alias_create_call_rcu_data create_call_rcu_data_bp -#define alias_set_cpu_call_rcu_data set_cpu_call_rcu_data_bp -#define alias_get_default_call_rcu_data get_default_call_rcu_data_bp -#define alias_get_call_rcu_data get_call_rcu_data_bp -#define alias_get_thread_call_rcu_data get_thread_call_rcu_data_bp -#define alias_set_thread_call_rcu_data set_thread_call_rcu_data_bp -#define alias_create_all_cpu_call_rcu_data \ - create_all_cpu_call_rcu_data_bp -#define alias_free_all_cpu_call_rcu_data \ - free_all_cpu_call_rcu_data_bp -#define alias_call_rcu call_rcu_bp -#define alias_call_rcu_data_free call_rcu_data_free_bp -#define alias_call_rcu_before_fork call_rcu_before_fork_bp -#define alias_call_rcu_after_fork_parent \ - call_rcu_after_fork_parent_bp -#define alias_call_rcu_after_fork_child call_rcu_after_fork_child_bp -#define alias_rcu_barrier rcu_barrier_bp - -#define alias_defer_rcu defer_rcu_bp -#define alias_rcu_defer_register_thread rcu_defer_register_thread_bp -#define alias_rcu_defer_unregister_thread \ - rcu_defer_unregister_thread_bp -#define alias_rcu_defer_barrier rcu_defer_barrier_bp -#define alias_rcu_defer_barrier_thread rcu_defer_barrier_thread_bp -#define alias_rcu_defer_exit rcu_defer_exit_bp - -#define alias_urcu_register_rculfhash_atfork \ - urcu_register_rculfhash_atfork_bp -#define alias_urcu_unregister_rculfhash_atfork \ - urcu_unregister_rculfhash_atfork_bp - - /* Compat identifiers for prior undocumented multiflavor usage */ #ifndef URCU_NO_COMPAT_IDENTIFIERS diff --git a/include/urcu/map/urcu-mb.h b/include/urcu/map/urcu-mb.h index 970513a..d3e9513 100644 --- a/include/urcu/map/urcu-mb.h +++ b/include/urcu/map/urcu-mb.h @@ -79,57 +79,6 @@ urcu_mb_unregister_rculfhash_atfork -/* Aliases for ABI(6) compat */ - -#define alias_rcu_flavor rcu_flavor_mb - -/* src/urcu.c */ -#define alias_rcu_read_lock rcu_read_lock_mb -#define alias_rcu_read_unlock rcu_read_unlock_mb -#define alias_rcu_read_ongoing rcu_read_ongoing_mb -#define alias_rcu_register_thread rcu_register_thread_mb -#define alias_rcu_unregister_thread rcu_unregister_thread_mb -#define alias_rcu_init rcu_init_mb -#define alias_synchronize_rcu synchronize_rcu_mb -#define alias_rcu_reader rcu_reader_mb -#define alias_rcu_gp rcu_gp_mb - -/* src/urcu-call-rcu-impl.h */ -#define alias_get_cpu_call_rcu_data get_cpu_call_rcu_data_mb -#define alias_get_call_rcu_thread get_call_rcu_thread_mb -#define alias_create_call_rcu_data create_call_rcu_data_mb -#define alias_set_cpu_call_rcu_data set_cpu_call_rcu_data_mb -#define alias_get_default_call_rcu_data get_default_call_rcu_data_mb -#define alias_get_call_rcu_data get_call_rcu_data_mb -#define alias_get_thread_call_rcu_data get_thread_call_rcu_data_mb -#define alias_set_thread_call_rcu_data set_thread_call_rcu_data_mb -#define alias_create_all_cpu_call_rcu_data \ - create_all_cpu_call_rcu_data_mb -#define alias_free_all_cpu_call_rcu_data \ - free_all_cpu_call_rcu_data_mb -#define alias_call_rcu call_rcu_mb -#define alias_call_rcu_data_free call_rcu_data_free_mb -#define alias_call_rcu_before_fork call_rcu_before_fork_mb -#define alias_call_rcu_after_fork_parent \ - call_rcu_after_fork_parent_mb -#define alias_call_rcu_after_fork_child call_rcu_after_fork_child_mb -#define alias_rcu_barrier rcu_barrier_mb - -#define alias_urcu_register_rculfhash_atfork \ - urcu_register_rculfhash_atfork_mb -#define alias_urcu_unregister_rculfhash_atfork \ - urcu_unregister_rculfhash_atfork_mb - -/* src/urcu-defer-impl.h */ -#define alias_defer_rcu defer_rcu_mb -#define alias_rcu_defer_register_thread rcu_defer_register_thread_mb -#define alias_rcu_defer_unregister_thread \ - rcu_defer_unregister_thread_mb -#define alias_rcu_defer_barrier rcu_defer_barrier_mb -#define alias_rcu_defer_barrier_thread rcu_defer_barrier_thread_mb -#define alias_rcu_defer_exit rcu_defer_exit_mb - - /* Compat identifiers for prior undocumented multiflavor usage */ #ifndef URCU_NO_COMPAT_IDENTIFIERS diff --git a/include/urcu/map/urcu-memb.h b/include/urcu/map/urcu-memb.h index 902bb6f..1e9740f 100644 --- a/include/urcu/map/urcu-memb.h +++ b/include/urcu/map/urcu-memb.h @@ -79,57 +79,6 @@ urcu_memb_unregister_rculfhash_atfork -/* Aliases for ABI(6) compat */ - -#define alias_rcu_flavor rcu_flavor_memb - -/* src/urcu.c */ -#define alias_rcu_read_lock rcu_read_lock_memb -#define alias_rcu_read_unlock rcu_read_unlock_memb -#define alias_rcu_read_ongoing rcu_read_ongoing_memb -#define alias_rcu_register_thread rcu_register_thread_memb -#define alias_rcu_unregister_thread rcu_unregister_thread_memb -#define alias_rcu_init rcu_init_memb -#define alias_synchronize_rcu synchronize_rcu_memb -#define alias_rcu_reader rcu_reader_memb -#define alias_rcu_gp rcu_gp_memb - -/* src/urcu-call-rcu-impl.h */ -#define alias_get_cpu_call_rcu_data get_cpu_call_rcu_data_memb -#define alias_get_call_rcu_thread get_call_rcu_thread_memb -#define alias_create_call_rcu_data create_call_rcu_data_memb -#define alias_set_cpu_call_rcu_data set_cpu_call_rcu_data_memb -#define alias_get_default_call_rcu_data get_default_call_rcu_data_memb -#define alias_get_call_rcu_data get_call_rcu_data_memb -#define alias_get_thread_call_rcu_data get_thread_call_rcu_data_memb -#define alias_set_thread_call_rcu_data set_thread_call_rcu_data_memb -#define alias_create_all_cpu_call_rcu_data \ - create_all_cpu_call_rcu_data_memb -#define alias_free_all_cpu_call_rcu_data \ - free_all_cpu_call_rcu_data_memb -#define alias_call_rcu call_rcu_memb -#define alias_call_rcu_data_free call_rcu_data_free_memb -#define alias_call_rcu_before_fork call_rcu_before_fork_memb -#define alias_call_rcu_after_fork_parent \ - call_rcu_after_fork_parent_memb -#define alias_call_rcu_after_fork_child call_rcu_after_fork_child_memb -#define alias_rcu_barrier rcu_barrier_memb - -#define alias_urcu_register_rculfhash_atfork \ - urcu_register_rculfhash_atfork_memb -#define alias_urcu_unregister_rculfhash_atfork \ - urcu_unregister_rculfhash_atfork_memb - -/* src/urcu-defer-impl.h */ -#define alias_defer_rcu defer_rcu_memb -#define alias_rcu_defer_register_thread rcu_defer_register_thread_memb -#define alias_rcu_defer_unregister_thread \ - rcu_defer_unregister_thread_memb -#define alias_rcu_defer_barrier rcu_defer_barrier_memb -#define alias_rcu_defer_barrier_thread rcu_defer_barrier_thread_memb -#define alias_rcu_defer_exit rcu_defer_exit_memb - - /* Compat identifiers for prior undocumented multiflavor usage */ #ifndef URCU_NO_COMPAT_IDENTIFIERS diff --git a/include/urcu/map/urcu-qsbr.h b/include/urcu/map/urcu-qsbr.h index 6486da0..ce4d50b 100644 --- a/include/urcu/map/urcu-qsbr.h +++ b/include/urcu/map/urcu-qsbr.h @@ -77,57 +77,6 @@ #define urcu_unregister_rculfhash_atfork \ urcu_qsbr_unregister_rculfhash_atfork -/* Aliases for ABI(6) compat */ - -#define alias_rcu_flavor rcu_flavor_qsbr - -/* src/urcu.c */ -#define alias_rcu_read_lock rcu_read_lock_qsbr -#define alias_rcu_read_unlock rcu_read_unlock_qsbr -#define alias_rcu_read_ongoing rcu_read_ongoing_qsbr -#define alias_rcu_register_thread rcu_register_thread_qsbr -#define alias_rcu_unregister_thread rcu_unregister_thread_qsbr -#define alias_rcu_init rcu_init_qsbr -#define alias_synchronize_rcu synchronize_rcu_qsbr -#define alias_rcu_reader rcu_reader_qsbr -#define alias_rcu_gp rcu_gp_qsbr - -/* src/urcu-call-rcu-impl.h */ -#define alias_get_cpu_call_rcu_data get_cpu_call_rcu_data_qsbr -#define alias_get_call_rcu_thread get_call_rcu_thread_qsbr -#define alias_create_call_rcu_data create_call_rcu_data_qsbr -#define alias_set_cpu_call_rcu_data set_cpu_call_rcu_data_qsbr -#define alias_get_default_call_rcu_data get_default_call_rcu_data_qsbr -#define alias_get_call_rcu_data get_call_rcu_data_qsbr -#define alias_get_thread_call_rcu_data get_thread_call_rcu_data_qsbr -#define alias_set_thread_call_rcu_data set_thread_call_rcu_data_qsbr -#define alias_create_all_cpu_call_rcu_data \ - create_all_cpu_call_rcu_data_qsbr -#define alias_free_all_cpu_call_rcu_data \ - free_all_cpu_call_rcu_data_qsbr -#define alias_call_rcu call_rcu_qsbr -#define alias_call_rcu_data_free call_rcu_data_free_qsbr -#define alias_call_rcu_before_fork call_rcu_before_fork_qsbr -#define alias_call_rcu_after_fork_parent \ - call_rcu_after_fork_parent_qsbr -#define alias_call_rcu_after_fork_child call_rcu_after_fork_child_qsbr -#define alias_rcu_barrier rcu_barrier_qsbr - -#define alias_urcu_register_rculfhash_atfork \ - urcu_register_rculfhash_atfork_qsbr -#define alias_urcu_unregister_rculfhash_atfork \ - urcu_unregister_rculfhash_atfork_qsbr - -/* src/urcu-defer-impl.h */ -#define alias_defer_rcu defer_rcu_qsbr -#define alias_rcu_defer_register_thread rcu_defer_register_thread_qsbr -#define alias_rcu_defer_unregister_thread \ - rcu_defer_unregister_thread_qsbr -#define alias_rcu_defer_barrier rcu_defer_barrier_qsbr -#define alias_rcu_defer_barrier_thread rcu_defer_barrier_thread_qsbr -#define alias_rcu_defer_exit rcu_defer_exit_qsbr - - /* Compat identifiers for prior undocumented multiflavor usage */ #ifndef URCU_NO_COMPAT_IDENTIFIERS diff --git a/include/urcu/map/urcu-signal.h b/include/urcu/map/urcu-signal.h index 3665541..29ccaad 100644 --- a/include/urcu/map/urcu-signal.h +++ b/include/urcu/map/urcu-signal.h @@ -79,58 +79,6 @@ urcu_signal_unregister_rculfhash_atfork -/* Aliases for ABI(6) compat */ - -#define alias_rcu_flavor rcu_flavor_sig - -/* src/urcu.c */ -#define alias_rcu_read_lock rcu_read_lock_sig -#define alias_rcu_read_unlock rcu_read_unlock_sig -#define alias_rcu_read_ongoing rcu_read_ongoing_sig -#define alias_rcu_register_thread rcu_register_thread_sig -#define alias_rcu_unregister_thread rcu_unregister_thread_sig -#define alias_rcu_init rcu_init_sig -#define alias_rcu_exit rcu_exit_sig -#define alias_synchronize_rcu synchronize_rcu_sig -#define alias_rcu_reader rcu_reader_sig -#define alias_rcu_gp rcu_gp_sig - -/* src/urcu-call-rcu-impl.h */ -#define alias_get_cpu_call_rcu_data get_cpu_call_rcu_data_sig -#define alias_get_call_rcu_thread get_call_rcu_thread_sig -#define alias_create_call_rcu_data create_call_rcu_data_sig -#define alias_set_cpu_call_rcu_data set_cpu_call_rcu_data_sig -#define alias_get_default_call_rcu_data get_default_call_rcu_data_sig -#define alias_get_call_rcu_data get_call_rcu_data_sig -#define alias_get_thread_call_rcu_data get_thread_call_rcu_data_sig -#define alias_set_thread_call_rcu_data set_thread_call_rcu_data_sig -#define alias_create_all_cpu_call_rcu_data \ - create_all_cpu_call_rcu_data_sig -#define alias_free_all_cpu_call_rcu_data \ - free_all_cpu_call_rcu_data_sig -#define alias_call_rcu call_rcu_sig -#define alias_call_rcu_data_free call_rcu_data_free_sig -#define alias_call_rcu_before_fork call_rcu_before_fork_sig -#define alias_call_rcu_after_fork_parent \ - call_rcu_after_fork_parent_sig -#define alias_call_rcu_after_fork_child call_rcu_after_fork_child_sig -#define alias_rcu_barrier rcu_barrier_sig - -#define alias_urcu_register_rculfhash_atfork \ - urcu_register_rculfhash_atfork_sig -#define alias_urcu_unregister_rculfhash_atfork \ - urcu_unregister_rculfhash_atfork_sig - -/* src/urcu-defer-impl.h */ -#define alias_defer_rcu defer_rcu_sig -#define alias_rcu_defer_register_thread rcu_defer_register_thread_sig -#define alias_rcu_defer_unregister_thread \ - rcu_defer_unregister_thread_sig -#define alias_rcu_defer_barrier rcu_defer_barrier_sig -#define alias_rcu_defer_barrier_thread rcu_defer_barrier_thread_sig -#define alias_rcu_defer_exit rcu_defer_exit_sig - - /* Compat identifiers for prior undocumented multiflavor usage */ #ifndef URCU_NO_COMPAT_IDENTIFIERS diff --git a/src/urcu-bp.c b/src/urcu-bp.c index 671becb..0d6ff4b 100644 --- a/src/urcu-bp.c +++ b/src/urcu-bp.c @@ -148,14 +148,12 @@ static int initialized; static pthread_key_t urcu_bp_key; struct urcu_bp_gp urcu_bp_gp = { .ctr = URCU_BP_GP_COUNT }; -URCU_ATTR_ALIAS("urcu_bp_gp") extern struct urcu_bp_gp rcu_gp_bp; /* * Pointer to registry elements. Written to only by each individual reader. Read * by both the reader and the writers. */ DEFINE_URCU_TLS(struct urcu_bp_reader *, urcu_bp_reader); -DEFINE_URCU_TLS_ALIAS(struct urcu_bp_reader *, urcu_bp_reader, rcu_reader_bp); static CDS_LIST_HEAD(registry); @@ -349,7 +347,6 @@ out: ret = pthread_sigmask(SIG_SETMASK, &oldmask, NULL); assert(!ret); } -URCU_ATTR_ALIAS("urcu_bp_synchronize_rcu") void synchronize_rcu_bp(); /* * library wrappers to be used by non-LGPL compatible source code. @@ -359,19 +356,16 @@ void urcu_bp_read_lock(void) { _urcu_bp_read_lock(); } -URCU_ATTR_ALIAS("urcu_bp_read_lock") void rcu_read_lock_bp(); void urcu_bp_read_unlock(void) { _urcu_bp_read_unlock(); } -URCU_ATTR_ALIAS("urcu_bp_read_unlock") void rcu_read_unlock_bp(); int urcu_bp_read_ongoing(void) { return _urcu_bp_read_ongoing(); } -URCU_ATTR_ALIAS("urcu_bp_read_ongoing") int rcu_read_ongoing_bp(); /* * Only grow for now. If empty, allocate a ARENA_INIT_ALLOC sized chunk. @@ -567,7 +561,6 @@ end: if (ret) abort(); } -URCU_ATTR_ALIAS("urcu_bp_register") void rcu_bp_register(); void urcu_bp_register_thread(void) { @@ -699,7 +692,6 @@ void urcu_bp_before_fork(void) mutex_lock(&rcu_registry_lock); saved_fork_signal_mask = oldmask; } -URCU_ATTR_ALIAS("urcu_bp_before_fork") void rcu_bp_before_fork(); void urcu_bp_after_fork_parent(void) { @@ -712,8 +704,6 @@ void urcu_bp_after_fork_parent(void) ret = pthread_sigmask(SIG_SETMASK, &oldmask, NULL); assert(!ret); } -URCU_ATTR_ALIAS("urcu_bp_after_fork_parent") -void rcu_bp_after_fork_parent(void); /* * Prune all entries from registry except our own thread. Fits the Linux @@ -750,15 +740,11 @@ void urcu_bp_after_fork_child(void) ret = pthread_sigmask(SIG_SETMASK, &oldmask, NULL); assert(!ret); } -URCU_ATTR_ALIAS("urcu_bp_after_fork_child") -void rcu_bp_after_fork_child(void); void *urcu_bp_dereference_sym(void *p) { return _rcu_dereference(p); } -URCU_ATTR_ALIAS("urcu_bp_dereference_sym") -void *rcu_dereference_sym_bp(); void *urcu_bp_set_pointer_sym(void **p, void *v) { @@ -766,27 +752,20 @@ void *urcu_bp_set_pointer_sym(void **p, void *v) uatomic_set(p, v); return v; } -URCU_ATTR_ALIAS("urcu_bp_set_pointer_sym") -void *rcu_set_pointer_sym_bp(); void *urcu_bp_xchg_pointer_sym(void **p, void *v) { cmm_wmb(); return uatomic_xchg(p, v); } -URCU_ATTR_ALIAS("urcu_bp_xchg_pointer_sym") -void *rcu_xchg_pointer_sym_bp(); void *urcu_bp_cmpxchg_pointer_sym(void **p, void *old, void *_new) { cmm_wmb(); return uatomic_cmpxchg(p, old, _new); } -URCU_ATTR_ALIAS("urcu_bp_cmpxchg_pointer_sym") -void *rcu_cmpxchg_pointer_sym_bp(); DEFINE_RCU_FLAVOR(rcu_flavor); -DEFINE_RCU_FLAVOR_ALIAS(rcu_flavor, alias_rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" diff --git a/src/urcu-call-rcu-impl.h b/src/urcu-call-rcu-impl.h index 9f2ed7d..2886865 100644 --- a/src/urcu-call-rcu-impl.h +++ b/src/urcu-call-rcu-impl.h @@ -462,8 +462,6 @@ struct call_rcu_data *get_cpu_call_rcu_data(int cpu) return NULL; return rcu_dereference(pcpu_crdp[cpu]); } -URCU_ATTR_ALIAS(urcu_stringify(get_cpu_call_rcu_data)) -struct call_rcu_data *alias_get_cpu_call_rcu_data(); /* * Return the tid corresponding to the call_rcu thread whose @@ -474,8 +472,6 @@ pthread_t get_call_rcu_thread(struct call_rcu_data *crdp) { return crdp->tid; } -URCU_ATTR_ALIAS(urcu_stringify(get_call_rcu_thread)) -pthread_t alias_get_call_rcu_thread(); /* * Create a call_rcu_data structure (with thread) and return a pointer. @@ -490,8 +486,6 @@ static struct call_rcu_data *__create_call_rcu_data(unsigned long flags, return crdp; } -URCU_ATTR_ALIAS(urcu_stringify(create_call_rcu_data)) -struct call_rcu_data *alias_create_call_rcu_data(); struct call_rcu_data *create_call_rcu_data(unsigned long flags, int cpu_affinity) { @@ -548,8 +542,6 @@ int set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp) call_rcu_unlock(&call_rcu_mutex); return 0; } -URCU_ATTR_ALIAS(urcu_stringify(set_cpu_call_rcu_data)) -int alias_set_cpu_call_rcu_data(); /* * Return a pointer to the default call_rcu_data structure, creating @@ -570,8 +562,6 @@ struct call_rcu_data *get_default_call_rcu_data(void) call_rcu_unlock(&call_rcu_mutex); return default_call_rcu_data; } -URCU_ATTR_ALIAS(urcu_stringify(get_default_call_rcu_data)) -struct call_rcu_data *alias_get_default_call_rcu_data(); /* * Return the call_rcu_data structure that applies to the currently @@ -599,8 +589,6 @@ struct call_rcu_data *get_call_rcu_data(void) return get_default_call_rcu_data(); } -URCU_ATTR_ALIAS(urcu_stringify(get_call_rcu_data)) -struct call_rcu_data *alias_get_call_rcu_data(); /* * Return a pointer to this task's call_rcu_data if there is one. @@ -610,8 +598,6 @@ struct call_rcu_data *get_thread_call_rcu_data(void) { return URCU_TLS(thread_call_rcu_data); } -URCU_ATTR_ALIAS(urcu_stringify(get_thread_call_rcu_data)) -struct call_rcu_data *alias_get_thread_call_rcu_data(); /* * Set this task's call_rcu_data structure as specified, regardless @@ -628,8 +614,6 @@ void set_thread_call_rcu_data(struct call_rcu_data *crdp) { URCU_TLS(thread_call_rcu_data) = crdp; } -URCU_ATTR_ALIAS(urcu_stringify(set_thread_call_rcu_data)) -void alias_set_thread_call_rcu_data(); /* * Create a separate call_rcu thread for each CPU. This does not @@ -681,8 +665,6 @@ int create_all_cpu_call_rcu_data(unsigned long flags) } return 0; } -URCU_ATTR_ALIAS(urcu_stringify(create_all_cpu_call_rcu_data)) -int alias_create_all_cpu_call_rcu_data(); /* * Wake up the call_rcu thread corresponding to the specified @@ -730,7 +712,6 @@ void call_rcu(struct rcu_head *head, _call_rcu(head, func, crdp); _rcu_read_unlock(); } -URCU_ATTR_ALIAS(urcu_stringify(call_rcu)) void alias_call_rcu(); /* * Free up the specified call_rcu_data structure, terminating the @@ -789,8 +770,6 @@ void call_rcu_data_free(struct call_rcu_data *crdp) free(crdp); } -URCU_ATTR_ALIAS(urcu_stringify(call_rcu_data_free)) -void alias_call_rcu_data_free(); /* * Clean up all the per-CPU call_rcu threads. @@ -831,16 +810,6 @@ void free_all_cpu_call_rcu_data(void) } free(crdp); } -#ifdef RCU_QSBR -/* ABI6 has a non-namespaced free_all_cpu_call_rcu_data for qsbr */ -#undef free_all_cpu_call_rcu_data -URCU_ATTR_ALIAS("urcu_qsbr_free_all_cpu_call_rcu_data") -void free_all_cpu_call_rcu_data(); -#define free_all_cpu_call_rcu_data urcu_qsbr_free_all_cpu_call_rcu_data -#else -URCU_ATTR_ALIAS(urcu_stringify(free_all_cpu_call_rcu_data)) -void alias_free_all_cpu_call_rcu_data(); -#endif static void free_completion(struct urcu_ref *ref) @@ -932,8 +901,6 @@ online: if (was_online) rcu_thread_online(); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_barrier)) -void alias_rcu_barrier(); /* * Acquire the call_rcu_mutex in order to ensure that the child sees @@ -962,8 +929,6 @@ void call_rcu_before_fork(void) (void) poll(NULL, 0, 1); } } -URCU_ATTR_ALIAS(urcu_stringify(call_rcu_before_fork)) -void alias_call_rcu_before_fork(); /* * Clean up call_rcu data structures in the parent of a successful fork() @@ -986,8 +951,6 @@ void call_rcu_after_fork_parent(void) atfork->after_fork_parent(atfork->priv); call_rcu_unlock(&call_rcu_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(call_rcu_after_fork_parent)) -void alias_call_rcu_after_fork_parent(); /* * Clean up call_rcu data structures in the child of a successful fork() @@ -1035,8 +998,6 @@ void call_rcu_after_fork_child(void) call_rcu_data_free(crdp); } } -URCU_ATTR_ALIAS(urcu_stringify(call_rcu_after_fork_child)) -void alias_call_rcu_after_fork_child(); void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork) { @@ -1047,8 +1008,6 @@ void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork) end: call_rcu_unlock(&call_rcu_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(urcu_register_rculfhash_atfork)) -void alias_urcu_register_rculfhash_atfork(); void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__((unused))) { @@ -1059,5 +1018,3 @@ void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__(( end: call_rcu_unlock(&call_rcu_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(urcu_unregister_rculfhash_atfork)) -void alias_urcu_unregister_rculfhash_atfork(); diff --git a/src/urcu-defer-impl.h b/src/urcu-defer-impl.h index 969231f..8b5ad97 100644 --- a/src/urcu-defer-impl.h +++ b/src/urcu-defer-impl.h @@ -265,8 +265,6 @@ void rcu_defer_barrier_thread(void) _rcu_defer_barrier_thread(); mutex_unlock(&rcu_defer_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_defer_barrier_thread)) -void alias_rcu_defer_barrier_thread(); /* * rcu_defer_barrier - Execute all queued rcu callbacks. @@ -307,8 +305,6 @@ void rcu_defer_barrier(void) end: mutex_unlock(&rcu_defer_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_defer_barrier)) -void alias_rcu_defer_barrier(); /* * _defer_rcu - Queue a RCU callback. @@ -401,7 +397,6 @@ void defer_rcu(void (*fct)(void *p), void *p) { _defer_rcu(fct, p); } -URCU_ATTR_ALIAS(urcu_stringify(defer_rcu)) void alias_defer_rcu(); static void start_defer_thread(void) { @@ -450,8 +445,6 @@ int rcu_defer_register_thread(void) mutex_unlock(&defer_thread_mutex); return 0; } -URCU_ATTR_ALIAS(urcu_stringify(rcu_defer_register_thread)) -int alias_rcu_defer_register_thread(); void rcu_defer_unregister_thread(void) { @@ -470,14 +463,10 @@ void rcu_defer_unregister_thread(void) stop_defer_thread(); mutex_unlock(&defer_thread_mutex); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_defer_unregister_thread)) -void alias_rcu_defer_unregister_thread(); void rcu_defer_exit(void) { assert(cds_list_empty(®istry_defer)); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_defer_exit)) -void alias_rcu_defer_exit(); #endif /* _URCU_DEFER_IMPL_H */ diff --git a/src/urcu-qsbr.c b/src/urcu-qsbr.c index 3709412..40c0fbd 100644 --- a/src/urcu-qsbr.c +++ b/src/urcu-qsbr.c @@ -70,7 +70,6 @@ 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 }; -URCU_ATTR_ALIAS("urcu_qsbr_gp") extern struct urcu_gp rcu_gp_qsbr; /* * Active attempts to check for reader Q.S. before calling futex(). @@ -82,7 +81,6 @@ URCU_ATTR_ALIAS("urcu_qsbr_gp") extern struct urcu_gp rcu_gp_qsbr; * writers. */ DEFINE_URCU_TLS(struct urcu_qsbr_reader, urcu_qsbr_reader); -DEFINE_URCU_TLS_ALIAS(struct urcu_qsbr_reader, urcu_qsbr_reader, rcu_reader_qsbr); static CDS_LIST_HEAD(registry); @@ -431,8 +429,6 @@ gp_end: cmm_smp_mb(); } #endif /* !(CAA_BITS_PER_LONG < 64) */ -URCU_ATTR_ALIAS("urcu_qsbr_synchronize_rcu") -void synchronize_rcu_qsbr(); /* * library wrappers to be used by non-LGPL compatible source code. @@ -442,41 +438,34 @@ void urcu_qsbr_read_lock(void) { _urcu_qsbr_read_lock(); } -URCU_ATTR_ALIAS("urcu_qsbr_read_lock") void rcu_read_lock_qsbr(); void urcu_qsbr_read_unlock(void) { _urcu_qsbr_read_unlock(); } -URCU_ATTR_ALIAS("urcu_qsbr_read_unlock") void rcu_read_unlock_qsbr(); int urcu_qsbr_read_ongoing(void) { return _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(); } -URCU_ATTR_ALIAS("urcu_qsbr_quiescent_state") void rcu_quiescent_state_qsbr(); void urcu_qsbr_thread_offline(void) { _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(); } -URCU_ATTR_ALIAS("urcu_qsbr_thread_online") -void rcu_thread_online_qsbr(); void urcu_qsbr_register_thread(void) { @@ -490,8 +479,6 @@ void urcu_qsbr_register_thread(void) mutex_unlock(&rcu_registry_lock); _urcu_qsbr_thread_online(); } -URCU_ATTR_ALIAS("urcu_qsbr_register_thread") -void rcu_register_thread_qsbr(); void urcu_qsbr_unregister_thread(void) { @@ -506,8 +493,6 @@ void urcu_qsbr_unregister_thread(void) cds_list_del(&URCU_TLS(urcu_qsbr_reader).node); mutex_unlock(&rcu_registry_lock); } -URCU_ATTR_ALIAS("urcu_qsbr_unregister_thread") -void rcu_unregister_thread_qsbr(); void urcu_qsbr_exit(void) { @@ -517,10 +502,8 @@ void urcu_qsbr_exit(void) * assert(cds_list_empty(®istry)); */ } -URCU_ATTR_ALIAS("urcu_qsbr_exit") void rcu_exit_qsbr(); DEFINE_RCU_FLAVOR(rcu_flavor); -DEFINE_RCU_FLAVOR_ALIAS(rcu_flavor, alias_rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" diff --git a/src/urcu-utils.h b/src/urcu-utils.h index 69e37bd..af03675 100644 --- a/src/urcu-utils.h +++ b/src/urcu-utils.h @@ -42,25 +42,4 @@ __min1 <= __min2 ? __min1: __min2; \ }) -/* There is no concept of symbol aliases on MacOS */ -#ifdef __APPLE__ -#define URCU_ATTR_ALIAS(x) -#else -#define URCU_ATTR_ALIAS(x) __attribute__((alias(x))) -#endif - -#ifdef CONFIG_RCU_TLS -#define DEFINE_URCU_TLS_ALIAS_1(type, name, alias) \ - URCU_ATTR_ALIAS(#name) \ - extern type alias - -#else -#define DEFINE_URCU_TLS_ALIAS_1(type, name, alias) \ - URCU_ATTR_ALIAS("*__tls_access_" #name) \ - type *__tls_access_ ## alias() -#endif - -#define DEFINE_URCU_TLS_ALIAS(type, name, alias) \ - DEFINE_URCU_TLS_ALIAS_1(type, name, alias) - #endif /* _URCU_UTILS_H */ diff --git a/src/urcu.c b/src/urcu.c index e64432f..2c9e5d1 100644 --- a/src/urcu.c +++ b/src/urcu.c @@ -94,8 +94,6 @@ static int urcu_memb_has_sys_membarrier_private_expedited; * uninitialized variable. */ int urcu_memb_has_sys_membarrier = 0; -URCU_ATTR_ALIAS("urcu_memb_has_sys_membarrier") -extern int rcu_has_sys_membarrier_memb; #endif void __attribute__((constructor)) rcu_init(void); @@ -105,8 +103,6 @@ void __attribute__((constructor)) rcu_init(void); void rcu_init(void) { } -URCU_ATTR_ALIAS(urcu_stringify(rcu_init)) -void alias_rcu_init(void); #endif #ifdef RCU_SIGNAL @@ -132,15 +128,12 @@ static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER; */ static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER; struct urcu_gp rcu_gp = { .ctr = URCU_GP_COUNT }; -URCU_ATTR_ALIAS(urcu_stringify(rcu_gp)) -extern struct urcu_gp alias_rcu_gp; /* * Written to only by each individual reader. Read by both the reader and the * writers. */ DEFINE_URCU_TLS(struct urcu_reader, rcu_reader); -DEFINE_URCU_TLS_ALIAS(struct urcu_reader, rcu_reader, alias_rcu_reader); static CDS_LIST_HEAD(registry); @@ -516,8 +509,6 @@ out: */ urcu_wake_all_waiters(&waiters); } -URCU_ATTR_ALIAS(urcu_stringify(synchronize_rcu)) -void alias_synchronize_rcu(); /* * library wrappers to be used by non-LGPL compatible source code. @@ -527,22 +518,16 @@ void rcu_read_lock(void) { _rcu_read_lock(); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_read_lock)) -void alias_rcu_read_lock(); void rcu_read_unlock(void) { _rcu_read_unlock(); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_read_unlock)) -void alias_rcu_read_unlock(); int rcu_read_ongoing(void) { return _rcu_read_ongoing(); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_read_ongoing)) -void alias_rcu_read_ongoing(); void rcu_register_thread(void) { @@ -557,8 +542,6 @@ void rcu_register_thread(void) cds_list_add(&URCU_TLS(rcu_reader).node, ®istry); mutex_unlock(&rcu_registry_lock); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_register_thread)) -void alias_rcu_register_thread(); void rcu_unregister_thread(void) { @@ -568,8 +551,6 @@ void rcu_unregister_thread(void) cds_list_del(&URCU_TLS(rcu_reader).node); mutex_unlock(&rcu_registry_lock); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_unregister_thread)) -void alias_rcu_unregister_thread(); #ifdef RCU_MEMBARRIER @@ -617,8 +598,6 @@ void rcu_init(void) init_done = 1; rcu_sys_membarrier_init(); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_init)) -void alias_rcu_init(void); #endif #ifdef RCU_SIGNAL @@ -660,8 +639,6 @@ void rcu_init(void) if (ret) urcu_die(errno); } -URCU_ATTR_ALIAS(urcu_stringify(rcu_init)) -void alias_rcu_init(void); void rcu_exit(void) { @@ -674,13 +651,10 @@ void rcu_exit(void) * assert(cds_list_empty(®istry)); */ } -URCU_ATTR_ALIAS(urcu_stringify(rcu_exit)) -void alias_rcu_exit(void); #endif /* #ifdef RCU_SIGNAL */ DEFINE_RCU_FLAVOR(rcu_flavor); -DEFINE_RCU_FLAVOR_ALIAS(rcu_flavor, alias_rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h"