diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 23:45:23 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 23:45:23 +0000 |
commit | fba7fc5a21f5c56e4878228d2311d040e5b84653 (patch) | |
tree | b89150c1dfec0205b7d4996d776d37fb177e2ec4 | |
parent | hurd: Add __pthread_spin_wait and use it (diff) | |
download | glibc-fba7fc5a21f5c56e4878228d2311d040e5b84653.tar.gz glibc-fba7fc5a21f5c56e4878228d2311d040e5b84653.tar.bz2 glibc-fba7fc5a21f5c56e4878228d2311d040e5b84653.zip |
htl C11 threads: Avoid pthread_ symbols visibility in static library
42 files changed, 41 insertions, 45 deletions
diff --git a/htl/pt-create.c b/htl/pt-create.c index 090d394f53..f501a12017 100644 --- a/htl/pt-create.c +++ b/htl/pt-create.c @@ -89,7 +89,7 @@ __pthread_create (pthread_t * thread, const pthread_attr_t * attr, return err; } -strong_alias (__pthread_create, pthread_create) +weak_alias (__pthread_create, pthread_create) /* Internal version of pthread_create. See comment in pt-internal.h. */ diff --git a/htl/pt-detach.c b/htl/pt-detach.c index 3d8e3ad0fe..175560667a 100644 --- a/htl/pt-detach.c +++ b/htl/pt-detach.c @@ -77,4 +77,4 @@ __pthread_detach (pthread_t thread) return err; } -strong_alias (__pthread_detach, pthread_detach) +weak_alias (__pthread_detach, pthread_detach) diff --git a/htl/pt-exit.c b/htl/pt-exit.c index 94e3cd9dc0..18c81d3f9c 100644 --- a/htl/pt-exit.c +++ b/htl/pt-exit.c @@ -109,4 +109,4 @@ __pthread_exit (void *status) abort (); } -strong_alias (__pthread_exit, pthread_exit); +weak_alias (__pthread_exit, pthread_exit); diff --git a/htl/pt-join.c b/htl/pt-join.c index ecb79e7c49..0473511be9 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -76,4 +76,4 @@ __pthread_join (pthread_t thread, void **status) return err; } -strong_alias (__pthread_join, pthread_join); +weak_alias (__pthread_join, pthread_join); diff --git a/htl/pt-self.c b/htl/pt-self.c index fa38df2b6f..e2bc1b97a5 100644 --- a/htl/pt-self.c +++ b/htl/pt-self.c @@ -30,4 +30,4 @@ __pthread_self (void) return self->thread; } -strong_alias (__pthread_self, pthread_self); +weak_alias (__pthread_self, pthread_self); diff --git a/htl/pt-setcancelstate.c b/htl/pt-setcancelstate.c index 7b5899697d..f23e352d31 100644 --- a/htl/pt-setcancelstate.c +++ b/htl/pt-setcancelstate.c @@ -43,4 +43,4 @@ __pthread_setcancelstate (int state, int *oldstate) return 0; } -strong_alias (__pthread_setcancelstate, pthread_setcancelstate); +weak_alias (__pthread_setcancelstate, pthread_setcancelstate); diff --git a/htl/pt-setcanceltype.c b/htl/pt-setcanceltype.c index 2585d8b463..cf053ce677 100644 --- a/htl/pt-setcanceltype.c +++ b/htl/pt-setcanceltype.c @@ -43,4 +43,4 @@ __pthread_setcanceltype (int type, int *oldtype) return 0; } -strong_alias (__pthread_setcanceltype, pthread_setcanceltype); +weak_alias (__pthread_setcanceltype, pthread_setcanceltype); diff --git a/sysdeps/htl/pt-attr-destroy.c b/sysdeps/htl/pt-attr-destroy.c index 4e2162f0ed..e7f408db66 100644 --- a/sysdeps/htl/pt-attr-destroy.c +++ b/sysdeps/htl/pt-attr-destroy.c @@ -24,4 +24,4 @@ __pthread_attr_destroy (pthread_attr_t *attr) { return 0; } -strong_alias (__pthread_attr_destroy, pthread_attr_destroy); +weak_alias (__pthread_attr_destroy, pthread_attr_destroy); diff --git a/sysdeps/htl/pt-attr-getdetachstate.c b/sysdeps/htl/pt-attr-getdetachstate.c index 7f50867315..7f36aca287 100644 --- a/sysdeps/htl/pt-attr-getdetachstate.c +++ b/sysdeps/htl/pt-attr-getdetachstate.c @@ -26,4 +26,4 @@ __pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate) return 0; } -strong_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate); +weak_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate); diff --git a/sysdeps/htl/pt-attr-getinheritsched.c b/sysdeps/htl/pt-attr-getinheritsched.c index 3ce892e6cd..8faccf10b3 100644 --- a/sysdeps/htl/pt-attr-getinheritsched.c +++ b/sysdeps/htl/pt-attr-getinheritsched.c @@ -26,4 +26,4 @@ __pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inheritsched) return 0; } -strong_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched); +weak_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched); diff --git a/sysdeps/htl/pt-attr-getschedparam.c b/sysdeps/htl/pt-attr-getschedparam.c index 7bee117dde..b57a813140 100644 --- a/sysdeps/htl/pt-attr-getschedparam.c +++ b/sysdeps/htl/pt-attr-getschedparam.c @@ -30,4 +30,4 @@ __pthread_attr_getschedparam (const pthread_attr_t *attr, return 0; } -strong_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam); +weak_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam); diff --git a/sysdeps/htl/pt-attr-getschedpolicy.c b/sysdeps/htl/pt-attr-getschedpolicy.c index 3308f32b59..5749ea5f85 100644 --- a/sysdeps/htl/pt-attr-getschedpolicy.c +++ b/sysdeps/htl/pt-attr-getschedpolicy.c @@ -26,4 +26,4 @@ __pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy) return 0; } -strong_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy); +weak_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy); diff --git a/sysdeps/htl/pt-attr-getscope.c b/sysdeps/htl/pt-attr-getscope.c index d810a8e38a..d2e85e2694 100644 --- a/sysdeps/htl/pt-attr-getscope.c +++ b/sysdeps/htl/pt-attr-getscope.c @@ -26,4 +26,4 @@ __pthread_attr_getscope (const pthread_attr_t *attr, int *contentionscope) return 0; } -strong_alias (__pthread_attr_getscope, pthread_attr_getscope); +weak_alias (__pthread_attr_getscope, pthread_attr_getscope); diff --git a/sysdeps/htl/pt-attr-init.c b/sysdeps/htl/pt-attr-init.c index 7b20204cd7..8954336417 100644 --- a/sysdeps/htl/pt-attr-init.c +++ b/sysdeps/htl/pt-attr-init.c @@ -27,4 +27,4 @@ __pthread_attr_init (pthread_attr_t *attr) *attr = __pthread_default_attr; return 0; } -strong_alias (__pthread_attr_init, pthread_attr_init); +weak_alias (__pthread_attr_init, pthread_attr_init); diff --git a/sysdeps/htl/pt-attr-setdetachstate.c b/sysdeps/htl/pt-attr-setdetachstate.c index 958cee9848..68791c540c 100644 --- a/sysdeps/htl/pt-attr-setdetachstate.c +++ b/sysdeps/htl/pt-attr-setdetachstate.c @@ -35,4 +35,4 @@ __pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate) return 0; } -strong_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate); +weak_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate); diff --git a/sysdeps/htl/pt-attr-setinheritsched.c b/sysdeps/htl/pt-attr-setinheritsched.c index 4602d84bba..3aaec0b7d9 100644 --- a/sysdeps/htl/pt-attr-setinheritsched.c +++ b/sysdeps/htl/pt-attr-setinheritsched.c @@ -35,4 +35,4 @@ __pthread_attr_setinheritsched (pthread_attr_t *attr, int inheritsched) return 0; } -strong_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched); +weak_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched); diff --git a/sysdeps/htl/pt-attr-setschedparam.c b/sysdeps/htl/pt-attr-setschedparam.c index 46f60266ac..61de154ac5 100644 --- a/sysdeps/htl/pt-attr-setschedparam.c +++ b/sysdeps/htl/pt-attr-setschedparam.c @@ -35,4 +35,4 @@ __pthread_attr_setschedparam (pthread_attr_t *attr, return ENOTSUP; } -strong_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam); +weak_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam); diff --git a/sysdeps/htl/pt-attr-setschedpolicy.c b/sysdeps/htl/pt-attr-setschedpolicy.c index 5cd044def7..6f73741c65 100644 --- a/sysdeps/htl/pt-attr-setschedpolicy.c +++ b/sysdeps/htl/pt-attr-setschedpolicy.c @@ -39,4 +39,4 @@ __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy) return 0; } -strong_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy); +weak_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy); diff --git a/sysdeps/htl/pt-attr-setscope.c b/sysdeps/htl/pt-attr-setscope.c index faae4e1f91..3765fab2ed 100644 --- a/sysdeps/htl/pt-attr-setscope.c +++ b/sysdeps/htl/pt-attr-setscope.c @@ -38,4 +38,4 @@ __pthread_attr_setscope (pthread_attr_t *attr, int contentionscope) } } -strong_alias (__pthread_attr_setscope, pthread_attr_setscope); +weak_alias (__pthread_attr_setscope, pthread_attr_setscope); diff --git a/sysdeps/htl/pt-cond-brdcast.c b/sysdeps/htl/pt-cond-brdcast.c index 816d183ab4..89c8a92bea 100644 --- a/sysdeps/htl/pt-cond-brdcast.c +++ b/sysdeps/htl/pt-cond-brdcast.c @@ -41,4 +41,4 @@ __pthread_cond_broadcast (pthread_cond_t *cond) return 0; } -strong_alias (__pthread_cond_broadcast, pthread_cond_broadcast); +weak_alias (__pthread_cond_broadcast, pthread_cond_broadcast); diff --git a/sysdeps/htl/pt-cond-destroy.c b/sysdeps/htl/pt-cond-destroy.c index 57c2682484..0664f3f6cc 100644 --- a/sysdeps/htl/pt-cond-destroy.c +++ b/sysdeps/htl/pt-cond-destroy.c @@ -32,4 +32,4 @@ __pthread_cond_destroy (pthread_cond_t *cond) return ret; } -strong_alias (__pthread_cond_destroy, pthread_cond_destroy); +weak_alias (__pthread_cond_destroy, pthread_cond_destroy); diff --git a/sysdeps/htl/pt-cond-init.c b/sysdeps/htl/pt-cond-init.c index c5330b5931..8c996a1d1b 100644 --- a/sysdeps/htl/pt-cond-init.c +++ b/sysdeps/htl/pt-cond-init.c @@ -44,4 +44,4 @@ __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t * attr) return 0; } -strong_alias (__pthread_cond_init, pthread_cond_init); +weak_alias (__pthread_cond_init, pthread_cond_init); diff --git a/sysdeps/htl/pt-cond-signal.c b/sysdeps/htl/pt-cond-signal.c index 30f21cc6b5..9cd5ea0862 100644 --- a/sysdeps/htl/pt-cond-signal.c +++ b/sysdeps/htl/pt-cond-signal.c @@ -39,4 +39,4 @@ __pthread_cond_signal (pthread_cond_t *cond) return 0; } -strong_alias (__pthread_cond_signal, pthread_cond_signal); +weak_alias (__pthread_cond_signal, pthread_cond_signal); diff --git a/sysdeps/htl/pt-cond-timedwait.c b/sysdeps/htl/pt-cond-timedwait.c index b5ce2f023e..d27f7ba8d6 100644 --- a/sysdeps/htl/pt-cond-timedwait.c +++ b/sysdeps/htl/pt-cond-timedwait.c @@ -34,7 +34,7 @@ __pthread_cond_timedwait (pthread_cond_t *cond, return __pthread_cond_timedwait_internal (cond, mutex, abstime); } -strong_alias (__pthread_cond_timedwait, pthread_cond_timedwait); +weak_alias (__pthread_cond_timedwait, pthread_cond_timedwait); struct cancel_ctx { diff --git a/sysdeps/htl/pt-cond-wait.c b/sysdeps/htl/pt-cond-wait.c index a8a7eb3332..2e87db0ca6 100644 --- a/sysdeps/htl/pt-cond-wait.c +++ b/sysdeps/htl/pt-cond-wait.c @@ -35,4 +35,4 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) return __pthread_cond_timedwait_internal (cond, mutex, 0); } -strong_alias (__pthread_cond_wait, pthread_cond_wait); +weak_alias (__pthread_cond_wait, pthread_cond_wait); diff --git a/sysdeps/htl/pt-condattr-destroy.c b/sysdeps/htl/pt-condattr-destroy.c index dc90ff14bd..aac922ea51 100644 --- a/sysdeps/htl/pt-condattr-destroy.c +++ b/sysdeps/htl/pt-condattr-destroy.c @@ -25,4 +25,4 @@ __pthread_condattr_destroy (pthread_condattr_t *cond) return 0; } -strong_alias (__pthread_condattr_destroy, pthread_condattr_destroy); +weak_alias (__pthread_condattr_destroy, pthread_condattr_destroy); diff --git a/sysdeps/htl/pt-condattr-init.c b/sysdeps/htl/pt-condattr-init.c index 90f5d1b6d6..2e68a925a8 100644 --- a/sysdeps/htl/pt-condattr-init.c +++ b/sysdeps/htl/pt-condattr-init.c @@ -28,4 +28,4 @@ __pthread_condattr_init (pthread_condattr_t *attr) return 0; } -strong_alias (__pthread_condattr_init, pthread_condattr_init); +weak_alias (__pthread_condattr_init, pthread_condattr_init); diff --git a/sysdeps/htl/pt-equal.c b/sysdeps/htl/pt-equal.c index e46a04df7e..78863eecfe 100644 --- a/sysdeps/htl/pt-equal.c +++ b/sysdeps/htl/pt-equal.c @@ -27,4 +27,4 @@ __pthread_equal (pthread_t __t1, pthread_t __t2) return __t1 == __t2; } -strong_alias (__pthread_equal, pthread_equal); +weak_alias (__pthread_equal, pthread_equal); diff --git a/sysdeps/htl/pt-getschedparam.c b/sysdeps/htl/pt-getschedparam.c index 20550bfb5b..87a408a55e 100644 --- a/sysdeps/htl/pt-getschedparam.c +++ b/sysdeps/htl/pt-getschedparam.c @@ -28,4 +28,4 @@ __pthread_getschedparam (pthread_t thread, int *policy, return 0; } -strong_alias (__pthread_getschedparam, pthread_getschedparam); +weak_alias (__pthread_getschedparam, pthread_getschedparam); diff --git a/sysdeps/htl/pt-getspecific.c b/sysdeps/htl/pt-getspecific.c index fc92479eb0..5118db38f8 100644 --- a/sysdeps/htl/pt-getspecific.c +++ b/sysdeps/htl/pt-getspecific.c @@ -35,5 +35,5 @@ __pthread_getspecific (pthread_key_t key) return self->thread_specifics[key]; } -strong_alias (__pthread_getspecific, pthread_getspecific); +weak_alias (__pthread_getspecific, pthread_getspecific); hidden_def (__pthread_getspecific) diff --git a/sysdeps/htl/pt-key-create.c b/sysdeps/htl/pt-key-create.c index 89fcd64724..73ac7dab8f 100644 --- a/sysdeps/htl/pt-key-create.c +++ b/sysdeps/htl/pt-key-create.c @@ -106,5 +106,5 @@ do_search: __pthread_mutex_unlock (&__pthread_key_lock); return 0; } -strong_alias (__pthread_key_create, pthread_key_create) +weak_alias (__pthread_key_create, pthread_key_create) hidden_def (__pthread_key_create) diff --git a/sysdeps/htl/pt-key-delete.c b/sysdeps/htl/pt-key-delete.c index 2f8aae16a5..f67fef9e25 100644 --- a/sysdeps/htl/pt-key-delete.c +++ b/sysdeps/htl/pt-key-delete.c @@ -61,4 +61,4 @@ __pthread_key_delete (pthread_key_t key) return err; } -strong_alias (__pthread_key_delete, pthread_key_delete) +weak_alias (__pthread_key_delete, pthread_key_delete) diff --git a/sysdeps/htl/pt-once.c b/sysdeps/htl/pt-once.c index 0104eebd3e..110891c23f 100644 --- a/sysdeps/htl/pt-once.c +++ b/sysdeps/htl/pt-once.c @@ -53,4 +53,4 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) return 0; } -strong_alias (__pthread_once, pthread_once); +weak_alias (__pthread_once, pthread_once); diff --git a/sysdeps/htl/pt-setschedparam.c b/sysdeps/htl/pt-setschedparam.c index 32736959db..0bc74e8e6a 100644 --- a/sysdeps/htl/pt-setschedparam.c +++ b/sysdeps/htl/pt-setschedparam.c @@ -26,5 +26,5 @@ __pthread_setschedparam (pthread_t thread, int policy, return ENOSYS; } -strong_alias (__pthread_setschedparam, pthread_setschedparam); +weak_alias (__pthread_setschedparam, pthread_setschedparam); stub_warning (pthread_setschedparam) diff --git a/sysdeps/htl/pt-setspecific.c b/sysdeps/htl/pt-setspecific.c index a046bdf300..b833786571 100644 --- a/sysdeps/htl/pt-setspecific.c +++ b/sysdeps/htl/pt-setspecific.c @@ -47,5 +47,5 @@ __pthread_setspecific (pthread_key_t key, const void *value) self->thread_specifics[key] = (void *) value; return 0; } -strong_alias (__pthread_setspecific, pthread_setspecific); +weak_alias (__pthread_setspecific, pthread_setspecific); hidden_def (__pthread_setspecific) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c index a5bfaddcb2..b1f68fe504 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c @@ -34,5 +34,5 @@ __pthread_mutex_destroy (pthread_mutex_t *mtxp) return 0; } -strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) +weak_alias (__pthread_mutex_destroy, pthread_mutex_destroy) hidden_def (__pthread_mutex_destroy) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-init.c b/sysdeps/mach/hurd/htl/pt-mutex-init.c index 7a2cc462f3..af052c493e 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-init.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-init.c @@ -55,5 +55,5 @@ __pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) return 0; } -strong_alias (__pthread_mutex_init, pthread_mutex_init) +weak_alias (__pthread_mutex_init, pthread_mutex_init) hidden_def (__pthread_mutex_init) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c index 6d334a2977..22510701d8 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-lock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c @@ -77,4 +77,4 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp) } strong_alias (__pthread_mutex_lock, _pthread_mutex_lock) -strong_alias (__pthread_mutex_lock, pthread_mutex_lock) +weak_alias (__pthread_mutex_lock, pthread_mutex_lock) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c index 3aa7d798b2..b11bfc87c8 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c @@ -76,5 +76,5 @@ __pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp) return ret; } -strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) +weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) hidden_def (__pthread_mutex_timedlock) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c index 5708caf096..f883ec3f30 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c @@ -81,4 +81,4 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp) } strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock) -strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock) +weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c index 4b99a710f1..aabe9eafbb 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c @@ -88,4 +88,4 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp) } strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock) -strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock) +weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock) diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile index 445724f85f..e6e665b5fe 100644 --- a/sysdeps/mach/hurd/i386/Makefile +++ b/sysdeps/mach/hurd/i386/Makefile @@ -87,10 +87,6 @@ test-xfail-XOPEN2K8/sys/socket.h/conform = yes test-xfail-XOPEN2K8/sys/types.h/conform = yes test-xfail-XOPEN2K8/stdlib.h/conform = yes test-xfail-XOPEN2K8/arpa/inet.h/conform = yes - -# For bug 23819 -test-xfail-ISO11/threads.h/linknamespace = yes -test-xfail-ISO11/threads.h/conform = yes endif # For bug 23286 |