+/*
+ * Define with an without macro expansion to handle erroneous callers.
+ * Trigger an abort() if the caller application uses the clashing symbol
+ * if a weak symbol is overridden.
+ */
+# define __DEFINE_URCU_TLS_GLOBAL(type, name) \
+ DEFINE_URCU_TLS_1(type, name) \
+ int __urcu_tls_symbol_refcount_ ## name __attribute__((weak)); \
+ static __attribute__((constructor)) \
+ void __urcu_tls_inc_refcount_ ## name(void) \
+ { \
+ __urcu_tls_symbol_refcount_ ## name++; \
+ } \
+ type *__tls_access_ ## name(void) \
+ { \
+ if (__urcu_tls_symbol_refcount_ ## name > 1) { \
+ fprintf(stderr, "Error: Userspace RCU symbol clash for multiple concurrent flavors. Please upgrade liburcu libraries and headers, then recompile your application.\n"); \
+ abort(); \
+ } \
+ return __URCU_TLS_CALL(name)(); \
+ }
+