From 3db1417f5d2f17fdb62f328650c888ae3097c4c5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 24 May 2012 16:56:08 -0400 Subject: [PATCH] Fix library compatibility Commit 4d0d66bb795d1ed938e11a97a4e5f71326e20c71, implementing tls-compat.h for pthread TLS compatibility, adds a prefix in front of each TLS symbol (__tls_*). However, some of these symbols are exported by the URCU library (e.g. rcu_reader_mb, defined in urcu.c as "rcu_reader", which is overloaded by the urcu/map/urcu.h) to applications. Therefore, this breaks binary compatibility with 0.6.x versions of the library. This is not intended, and therefore is a bug, so we remove this __tls_* prefix from the variables declared, defined and referenced to through the tls-compat.h API for compilers supporting "__thread". Signed-off-by: Mathieu Desnoyers --- urcu/tls-compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/urcu/tls-compat.h b/urcu/tls-compat.h index d7c7537..9686eca 100644 --- a/urcu/tls-compat.h +++ b/urcu/tls-compat.h @@ -35,12 +35,12 @@ extern "C" { #ifdef CONFIG_RCU_TLS /* Based on ax_tls.m4 */ # define DECLARE_URCU_TLS(type, name) \ - CONFIG_RCU_TLS type __tls_ ## name + CONFIG_RCU_TLS type name # define DEFINE_URCU_TLS(type, name) \ - CONFIG_RCU_TLS type __tls_ ## name + CONFIG_RCU_TLS type name -# define URCU_TLS(name) (__tls_ ## name) +# define URCU_TLS(name) (name) #else /* #ifndef CONFIG_RCU_TLS */ -- 2.34.1