summaryrefslogtreecommitdiff
path: root/libpthread/nptl/pthreadP.h
diff options
context:
space:
mode:
authorWill Newton <will.newton@imgtec.com>2011-01-20 15:31:14 +0100
committerCarmelo Amoroso <carmelo.amoroso@st.com>2011-01-20 15:31:14 +0100
commit6d5e1c5ee7a3c307251c4be7076982f5a1f1769d (patch)
tree8b20249567b31063ac3dd2da65536a9bf8f1d1bd /libpthread/nptl/pthreadP.h
parent5c02df4f734011cccc65441e5dae2f5c18447f39 (diff)
nptl: Fix __USER_LABEL_PREFIX__ concatenatio
The current C macro magic does not correctly concatenate the __USER_LABEL_PREFIX__ string on architectures where it has a non-empty value. We need to use __stringify to get the desired behaviour. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libpthread/nptl/pthreadP.h')
-rw-r--r--libpthread/nptl/pthreadP.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
index c45bd1170..fbac7d08f 100644
--- a/libpthread/nptl/pthreadP.h
+++ b/libpthread/nptl/pthreadP.h
@@ -274,6 +274,8 @@ __do_cancel (void)
#define CANCEL_RESET(oldtype) \
__pthread_disable_asynccancel (oldtype)
+#define __LABEL_PREFIX__ __stringify(__USER_LABEL_PREFIX__)
+
#if !defined NOT_IN_libc
/* Same as CANCEL_ASYNC, but for use in libc.so. */
# define LIBC_CANCEL_ASYNC() \
@@ -282,22 +284,22 @@ __do_cancel (void)
# define LIBC_CANCEL_RESET(oldtype) \
__libc_disable_asynccancel (oldtype)
# define LIBC_CANCEL_HANDLED() \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__libc_enable_asynccancel"); \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__libc_disable_asynccancel")
+ __asm__ (".globl " __LABEL_PREFIX__ "__libc_enable_asynccancel"); \
+ __asm__ (".globl " __LABEL_PREFIX__ "__libc_disable_asynccancel")
#elif defined NOT_IN_libc && defined IS_IN_libpthread
# define LIBC_CANCEL_ASYNC() CANCEL_ASYNC ()
# define LIBC_CANCEL_RESET(val) CANCEL_RESET (val)
# define LIBC_CANCEL_HANDLED() \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__pthread_enable_asynccancel"); \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__pthread_disable_asynccancel")
+ __asm__ (".globl " __LABEL_PREFIX__ "__pthread_enable_asynccancel"); \
+ __asm__ (".globl " __LABEL_PREFIX__ "__pthread_disable_asynccancel")
#elif defined NOT_IN_libc && defined IS_IN_librt
# define LIBC_CANCEL_ASYNC() \
__librt_enable_asynccancel ()
# define LIBC_CANCEL_RESET(val) \
__librt_disable_asynccancel (val)
# define LIBC_CANCEL_HANDLED() \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__librt_enable_asynccancel"); \
- __asm__ (".globl " __USER_LABEL_PREFIX__ "__librt_disable_asynccancel")
+ __asm__ (".globl " __LABEL_PREFIX__ "__librt_enable_asynccancel"); \
+ __asm__ (".globl " __LABEL_PREFIX__ "__librt_disable_asynccancel")
#else
# define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */
# define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */