From 44d025b3b9f97f660bb2378a7a3801ed28d65e29 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 31 Jan 2006 20:54:59 +0000 Subject: New linuxthreads builds on x86, vapier: pt-allocrtsig.c is missing from sources --- libpthread/linuxthreads/Makefile.in | 6 +++--- libpthread/linuxthreads/internals.h | 25 ++++++++++++------------- libpthread/linuxthreads/mutex.c | 5 ----- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in index 7aa891517..abe59a881 100644 --- a/libpthread/linuxthreads/Makefile.in +++ b/libpthread/linuxthreads/Makefile.in @@ -44,14 +44,14 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre pthread_SRC := \ attr barrier cancel condvar errno events join pthread \ lockfile manager mutex pt-machine ptcleanup \ - ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \ + ptclock_gettime ptclock_settime ptfork pthandles \ pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \ pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \ rwlock semaphore sighandler signals specific spinlock pthread_SRC := $(patsubst %,$(libpthread_DIR)/%.c,$(pthread_SRC)) -libpthread_static_SRC := pt-allocrtsig -libpthread_shared_SRC := pthread_atfork +#libpthread_shared_SRC := pt-allocrtsig +libpthread_static_SRC := pthread_atfork libpthread_SRC := $(pthread_arch_SRC) $(pthread_linux_SRC) $(pthread_sysdep_SRC) $(pthread_SRC) libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC)) 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. */ diff --git a/libpthread/linuxthreads/mutex.c b/libpthread/linuxthreads/mutex.c index 44229278d..3c97ea7d6 100644 --- a/libpthread/linuxthreads/mutex.c +++ b/libpthread/linuxthreads/mutex.c @@ -36,7 +36,6 @@ int __pthread_mutex_init(pthread_mutex_t * mutex, return 0; } strong_alias (__pthread_mutex_init, pthread_mutex_init) -libc_hidden_def (__pthread_mutex_init) int __pthread_mutex_destroy(pthread_mutex_t * mutex) { @@ -56,7 +55,6 @@ int __pthread_mutex_destroy(pthread_mutex_t * mutex) } } strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) -libc_hidden_def (__pthread_mutex_destroy) int __pthread_mutex_trylock(pthread_mutex_t * mutex) { @@ -93,7 +91,6 @@ int __pthread_mutex_trylock(pthread_mutex_t * mutex) } } strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock) -libc_hidden_def (__pthread_mutex_trylock) int __pthread_mutex_lock(pthread_mutex_t * mutex) { @@ -127,7 +124,6 @@ int __pthread_mutex_lock(pthread_mutex_t * mutex) } } strong_alias (__pthread_mutex_lock, pthread_mutex_lock) -libc_hidden_def (__pthread_mutex_lock) int __pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime) @@ -203,7 +199,6 @@ int __pthread_mutex_unlock(pthread_mutex_t * mutex) } } strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock) -libc_hidden_def (__pthread_mutex_unlock) int __pthread_mutexattr_init(pthread_mutexattr_t *attr) { -- cgit v1.2.3