From c33b304eefddf75509dc40b5cf6ddda4b40ee37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 6 Aug 2010 13:31:35 +0300 Subject: nptl: fix calling convention for __pthread_mutex_cond_lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The assembly versions of pthread_cond_wait calls __pthread_mutex_cond_lock and __pthread_mutex_cond_lock_adjust using internal calling convention (which differs from default calling convention at least on x86). Thus these two functions must be defined with internal_function or the call sequence goes wrong. __pthread_mutex_cond_lock resides in sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c, but it does evil macro definitions and includes pthread_mutex_lock.c, so we need to add some extra kludge to pthread_mutex_lock.c to get the prototypes correctly. Signed-off-by: Timo Teräs Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/pthreadP.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libpthread/nptl/pthreadP.h') diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h index 85601d435..c45bd1170 100644 --- a/libpthread/nptl/pthreadP.h +++ b/libpthread/nptl/pthreadP.h @@ -414,8 +414,10 @@ extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_lock_internal (pthread_mutex_t *__mutex) attribute_hidden; -extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex); -extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex); +extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex) + attribute_hidden internal_function; +extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex) + attribute_hidden internal_function; extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); extern int __pthread_mutex_unlock_internal (pthread_mutex_t *__mutex) attribute_hidden; -- cgit v1.2.3