diff options
| author | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-26 22:16:19 +0200 |
|---|---|---|
| committer | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-30 00:45:53 +0200 |
| commit | 4d17e68350bd8f61632ec6402701be49fb271a84 (patch) | |
| tree | 956044ab7054d7b8f0625318180473f139b74ca0 | |
| parent | 11ef492c80ce975220505da705edc6122563fd69 (diff) | |
| download | glibc-4d17e68350bd8f61632ec6402701be49fb271a84.tar.xz glibc-4d17e68350bd8f61632ec6402701be49fb271a84.zip | |
Remove use of INTDEF/INTUSE in nptl
31 files changed, 126 insertions, 122 deletions
@@ -1,3 +1,46 @@ +2012-05-30 Andreas Schwab <schwab@linux-m68k.org> + + [BZ #14132] + * nptl-init.c (pthread_functions): Remove use of INTUSE and + _internal aliases. + (__pthread_initialize_minimal_internal): Likewise. + * sem_open.c: Likewise. + * sem_unlink.c: Likewise. + * pthreadP.h: Replace _internal aliases by hidden_proto + declarations. + * pthread_getspecific.c: Replace _internal alias by hidden_def. + * pthread_key_create.c: Likewise. + * pthread_mutex_destroy.c: Likewise. + * pthread_mutex_init.c: Likewise. + * pthread_mutex_lock.c: Likewise. + * pthread_mutex_unlock.c: Likewise. + * pthread_once.c: Likewise. + * pthread_rwlock_rdlock.c: Likewise. + * pthread_rwlock_unlock.c: Likewise. + * pthread_rwlock_wrlock.c: Likewise. + * pthread_setspecific.c: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: + Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: + Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: + Likewise. + * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise. + * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise. + * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise. + * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise. + * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise. + * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: + Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: + Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: + Likewise. + 2012-05-29 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * sysdeps/unix/sysv/linux/s390/s390-32/nptl/ld.abilist: Refreshed. diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index c0b7de013b..ea3d1ec804 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007, 2008, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -115,21 +115,21 @@ static const struct pthread_functions pthread_functions = .ptr___pthread_exit = __pthread_exit, .ptr_pthread_getschedparam = __pthread_getschedparam, .ptr_pthread_setschedparam = __pthread_setschedparam, - .ptr_pthread_mutex_destroy = INTUSE(__pthread_mutex_destroy), - .ptr_pthread_mutex_init = INTUSE(__pthread_mutex_init), - .ptr_pthread_mutex_lock = INTUSE(__pthread_mutex_lock), - .ptr_pthread_mutex_unlock = INTUSE(__pthread_mutex_unlock), + .ptr_pthread_mutex_destroy = __pthread_mutex_destroy, + .ptr_pthread_mutex_init = __pthread_mutex_init, + .ptr_pthread_mutex_lock = __pthread_mutex_lock, + .ptr_pthread_mutex_unlock = __pthread_mutex_unlock, .ptr_pthread_self = __pthread_self, .ptr_pthread_setcancelstate = __pthread_setcancelstate, .ptr_pthread_setcanceltype = __pthread_setcanceltype, .ptr___pthread_cleanup_upto = __pthread_cleanup_upto, - .ptr___pthread_once = __pthread_once_internal, - .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock_internal, - .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock_internal, - .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock_internal, - .ptr___pthread_key_create = __pthread_key_create_internal, - .ptr___pthread_getspecific = __pthread_getspecific_internal, - .ptr___pthread_setspecific = __pthread_setspecific_internal, + .ptr___pthread_once = __pthread_once, + .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock, + .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock, + .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock, + .ptr___pthread_key_create = __pthread_key_create, + .ptr___pthread_getspecific = __pthread_getspecific, + .ptr___pthread_setspecific = __pthread_setspecific, .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer, .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore, .ptr_nthreads = &__nptl_nthreads, @@ -442,12 +442,12 @@ __pthread_initialize_minimal_internal (void) /* Make __rtld_lock_{,un}lock_recursive use pthread_mutex_{,un}lock, keep the lock count from the ld.so implementation. */ - GL(dl_rtld_lock_recursive) = (void *) INTUSE (__pthread_mutex_lock); - GL(dl_rtld_unlock_recursive) = (void *) INTUSE (__pthread_mutex_unlock); + GL(dl_rtld_lock_recursive) = (void *) __pthread_mutex_lock; + GL(dl_rtld_unlock_recursive) = (void *) __pthread_mutex_unlock; unsigned int rtld_lock_count = GL(dl_load_lock).mutex.__data.__count; GL(dl_load_lock).mutex.__data.__count = 0; while (rtld_lock_count-- > 0) - INTUSE (__pthread_mutex_lock) (&GL(dl_load_lock).mutex); + __pthread_mutex_lock (&GL(dl_load_lock).mutex); GL(dl_make_stack_executable_hook) = &__make_stacks_executable; #endif diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 6427e3d2e0..fa89cbf44a 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -408,23 +408,14 @@ extern int __pthread_setschedparam (pthread_t thread_id, int policy, extern int __pthread_setcancelstate (int state, int *oldstate); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr); -extern int __pthread_mutex_init_internal (pthread_mutex_t *__mutex, - const pthread_mutexattr_t *__mutexattr) - attribute_hidden; extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); -extern int __pthread_mutex_destroy_internal (pthread_mutex_t *__mutex) - attribute_hidden; 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) 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; extern int __pthread_mutex_unlock_usercnt (pthread_mutex_t *__mutex, int __decr) attribute_hidden internal_function; @@ -467,13 +458,10 @@ extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); -extern int __pthread_rwlock_rdlock_internal (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); -extern int __pthread_rwlock_wrlock_internal (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -extern int __pthread_rwlock_unlock_internal (pthread_rwlock_t *__rwlock); extern int __pthread_cond_broadcast (pthread_cond_t *cond); extern int __pthread_cond_destroy (pthread_cond_t *cond); extern int __pthread_cond_init (pthread_cond_t *cond, @@ -486,17 +474,10 @@ extern int __pthread_cond_timedwait (pthread_cond_t *cond, extern int __pthread_condattr_destroy (pthread_condattr_t *attr); extern int __pthread_condattr_init (pthread_condattr_t *attr); extern int __pthread_key_create (pthread_key_t *key, void (*destr) (void *)); -extern int __pthread_key_create_internal (pthread_key_t *key, - void (*destr) (void *)); extern void *__pthread_getspecific (pthread_key_t key); -extern void *__pthread_getspecific_internal (pthread_key_t key); extern int __pthread_setspecific (pthread_key_t key, const void *value); -extern int __pthread_setspecific_internal (pthread_key_t key, - const void *value); extern int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)); -extern int __pthread_once_internal (pthread_once_t *once_control, - void (*init_routine) (void)); extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)); extern pthread_t __pthread_self (void); @@ -508,6 +489,20 @@ extern int __pthread_enable_asynccancel (void) attribute_hidden; extern void __pthread_disable_asynccancel (int oldtype) internal_function attribute_hidden; +#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_unlock) +hidden_proto (__pthread_rwlock_rdlock) +hidden_proto (__pthread_rwlock_wrlock) +hidden_proto (__pthread_rwlock_unlock) +hidden_proto (__pthread_key_create) +hidden_proto (__pthread_getspecific) +hidden_proto (__pthread_setspecific) +hidden_proto (__pthread_once) +#endif + extern int __pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond); extern int __pthread_cond_destroy_2_0 (pthread_cond_2_0_t *cond); extern int __pthread_cond_init_2_0 (pthread_cond_2_0_t *cond, diff --git a/nptl/pthread_getspecific.c b/nptl/pthread_getspecific.c index 3eb11e3a1f..17dedda783 100644 --- a/nptl/pthread_getspecific.c +++ b/nptl/pthread_getspecific.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -65,4 +65,4 @@ __pthread_getspecific (key) return result; } strong_alias (__pthread_getspecific, pthread_getspecific) -strong_alias (__pthread_getspecific, __pthread_getspecific_internal) +hidden_def (__pthread_getspecific) diff --git a/nptl/pthread_key_create.c b/nptl/pthread_key_create.c index b484dc5a4b..96e21ce6d6 100644 --- a/nptl/pthread_key_create.c +++ b/nptl/pthread_key_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -50,4 +50,4 @@ __pthread_key_create (key, destr) return EAGAIN; } strong_alias (__pthread_key_create, pthread_key_create) -strong_alias (__pthread_key_create, __pthread_key_create_internal) +hidden_def (__pthread_key_create) diff --git a/nptl/pthread_mutex_destroy.c b/nptl/pthread_mutex_destroy.c index 107ec8e4e4..b80b632cd9 100644 --- a/nptl/pthread_mutex_destroy.c +++ b/nptl/pthread_mutex_destroy.c @@ -38,4 +38,4 @@ __pthread_mutex_destroy (mutex) return 0; } strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) -INTDEF(__pthread_mutex_destroy) +hidden_def (__pthread_mutex_destroy) diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c index 6536e44d0b..91e9c366bf 100644 --- a/nptl/pthread_mutex_init.c +++ b/nptl/pthread_mutex_init.c @@ -140,4 +140,4 @@ __pthread_mutex_init (mutex, mutexattr) return 0; } strong_alias (__pthread_mutex_init, pthread_mutex_init) -INTDEF(__pthread_mutex_init) +hidden_def (__pthread_mutex_init) diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c index 2b30bad48d..3b1ef73396 100644 --- a/nptl/pthread_mutex_lock.c +++ b/nptl/pthread_mutex_lock.c @@ -478,7 +478,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex) } #ifndef __pthread_mutex_lock strong_alias (__pthread_mutex_lock, pthread_mutex_lock) -strong_alias (__pthread_mutex_lock, __pthread_mutex_lock_internal) +hidden_def (__pthread_mutex_lock) #endif diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c index aa8ecbd583..84e7415672 100644 --- a/nptl/pthread_mutex_unlock.c +++ b/nptl/pthread_mutex_unlock.c @@ -297,4 +297,4 @@ __pthread_mutex_unlock (mutex) return __pthread_mutex_unlock_usercnt (mutex, 1); } strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock) -strong_alias (__pthread_mutex_unlock, __pthread_mutex_unlock_internal) +hidden_def (__pthread_mutex_unlock) diff --git a/nptl/pthread_once.c b/nptl/pthread_once.c index 61fa057416..ed1ea3498c 100644 --- a/nptl/pthread_once.c +++ b/nptl/pthread_once.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -51,3 +51,4 @@ __pthread_once (once_control, init_routine) return 0; } strong_alias (__pthread_once, pthread_once) +hidden_def (__pthread_once) diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c index 14688e2981..2c176c7cb9 100644 --- a/nptl/pthread_rwlock_rdlock.c +++ b/nptl/pthread_rwlock_rdlock.c @@ -97,4 +97,4 @@ __pthread_rwlock_rdlock (rwlock) } weak_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock) -strong_alias (__pthread_rwlock_rdlock, __pthread_rwlock_rdlock_internal) +hidden_def (__pthread_rwlock_rdlock) diff --git a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c index a727d89b9c..5bb94c809e 100644 --- a/nptl/pthread_rwlock_unlock.c +++ b/nptl/pthread_rwlock_unlock.c @@ -58,4 +58,4 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) } weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock) -strong_alias (__pthread_rwlock_unlock, __pthread_rwlock_unlock_internal) +hidden_def (__pthread_rwlock_unlock) diff --git a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c index 6d8fb93c3b..1476d1370d 100644 --- a/nptl/pthread_rwlock_wrlock.c +++ b/nptl/pthread_rwlock_wrlock.c @@ -89,4 +89,4 @@ __pthread_rwlock_wrlock (rwlock) } weak_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock) -strong_alias (__pthread_rwlock_wrlock, __pthread_rwlock_wrlock_internal) +hidden_def (__pthread_rwlock_wrlock) diff --git a/nptl/pthread_setspecific.c b/nptl/pthread_setspecific.c index b960fd50cc..ec0cc9d95a 100644 --- a/nptl/pthread_setspecific.c +++ b/nptl/pthread_setspecific.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -92,4 +92,4 @@ __pthread_setspecific (key, value) return 0; } strong_alias (__pthread_setspecific, pthread_setspecific) -strong_alias (__pthread_setspecific, __pthread_setspecific_internal) +hidden_def (__pthread_setspecific) diff --git a/nptl/sem_open.c b/nptl/sem_open.c index e22d5e4006..e17a583bf8 100644 --- a/nptl/sem_open.c +++ b/nptl/sem_open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2006, 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -231,7 +231,7 @@ sem_open (const char *name, int oflag, ...) int fd; /* Determine where the shmfs is mounted. */ - INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs); + __pthread_once (&__namedsem_once, __where_is_shmfs); /* If we don't know the mount points there is nothing we can do. Ever. */ if (mountpoint.dir == NULL) diff --git a/nptl/sem_unlink.c b/nptl/sem_unlink.c index 3ffffdf4b7..610d82e7a6 100644 --- a/nptl/sem_unlink.c +++ b/nptl/sem_unlink.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -32,7 +32,7 @@ sem_unlink (name) size_t namelen; /* Determine where the shmfs is mounted. */ - INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs); + _ |
