summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/internals.h
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-31 20:54:59 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-31 20:54:59 +0000
commit44d025b3b9f97f660bb2378a7a3801ed28d65e29 (patch)
tree8111190c0de951848b8e983712e9c9eb89c1ca02 /libpthread/linuxthreads/internals.h
parent8c2b377d28710215838741cd9778c8e7229ebf26 (diff)
New linuxthreads builds on x86, vapier: pt-allocrtsig.c is missing from sources
Diffstat (limited to 'libpthread/linuxthreads/internals.h')
-rw-r--r--libpthread/linuxthreads/internals.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/libpthread/linuxthreads/internals.h b/libpthread/linuxthreads/internals.h
index 0f797b353..79334ef52 100644
--- a/libpthread/linuxthreads/internals.h
+++ b/libpthread/linuxthreads/internals.h
@@ -350,13 +350,7 @@ extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
-#if defined NOT_IN_libc && defined IS_IN_libpthread
-hidden_proto (__pthread_mutex_init)
-hidden_proto (__pthread_mutex_destroy)
-hidden_proto (__pthread_mutex_lock)
-hidden_proto (__pthread_mutex_trylock)
-hidden_proto (__pthread_mutex_unlock)
-#endif
+
extern int __pthread_cond_init (pthread_cond_t *cond,
const pthread_condattr_t *cond_attr);
extern int __pthread_cond_destroy (pthread_cond_t *cond);
@@ -480,30 +474,35 @@ extern void __pthread_cleanup_upto (__jmp_buf target,
char *targetframe) attribute_hidden;
extern pid_t __pthread_fork (struct fork_block *b) attribute_hidden;
+#define asm_handle(name) _asm_handle(name)
+#define _asm_handle(name) #name
+#define ASM_GLOBAL asm_handle(ASM_GLOBAL_DIRECTIVE)
+#define ASM_CANCEL(name) asm_handle(C_SYMBOL_NAME(name))
+
#if !defined NOT_IN_libc
# define LIBC_CANCEL_ASYNC() \
__libc_enable_asynccancel ()
# define LIBC_CANCEL_RESET(oldtype) \
__libc_disable_asynccancel (oldtype)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel")
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__libc_enable_asynccancel)); \
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__libc_disable_asynccancel))
#elif defined IS_IN_libpthread
# define LIBC_CANCEL_ASYNC() \
__pthread_enable_asynccancel ()
# define LIBC_CANCEL_RESET(oldtype) \
__pthread_disable_asynccancel (oldtype)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel")
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__pthread_enable_asynccancel)); \
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__pthread_disable_asynccancel))
#elif defined IS_IN_librt
# define LIBC_CANCEL_ASYNC() \
__librt_enable_asynccancel ()
# define LIBC_CANCEL_RESET(oldtype) \
__librt_disable_asynccancel (oldtype)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__librt_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__librt_disable_asynccancel")
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__librt_enable_asynccancel)); \
+ __asm__ (ASM_GLOBAL " " ASM_CANCEL(__librt_disable_asynccancel))
#else
# define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */
# define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */