summaryrefslogtreecommitdiff
path: root/pthread/pt-getattr.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-24 23:09:59 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-24 23:09:59 +0200
commitf881f17267506f3ced17259a066a4d95bffb57f0 (patch)
tree8fd2dd37c928033b6cc6fff7835575899b39b1e5 /pthread/pt-getattr.c
parent4c9332bfdc9ccd793b6ded3168602195913cedb3 (diff)
Fix symbols exposed in linkspace
Libc uses some thread functions, but should not expose the corresponding symbols, so use aliases. * Versions (__cthread_detach, __cthread_fork, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Add symbols * pthread/cthreads-compat.c (cthread_t, cthread_fn_t, cthread_key_t): Do not define. (cthread_detach): Rename to __cthread_detach. (cthread_detach): Define as weak alias to __cthread_detach. (cthread_fork, cthread_keycreate, cthread_getspecific, cthread_setspecific): Likewise. * pthread/pt-getattr.c (pthread_getattr_np): Likewise. * sysdeps/generic/pt-attr-getstack.c (pthread_attr_getstack): Likewise. * sysdeps/pthread/pthread.h (__cthread_t, __cthread_key_t, __cthread_fn_t, __cthread_fork, __cthread_detach, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Declare.
Diffstat (limited to 'pthread/pt-getattr.c')
-rw-r--r--pthread/pt-getattr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pthread/pt-getattr.c b/pthread/pt-getattr.c
index 574420a..0b86c66 100644
--- a/pthread/pt-getattr.c
+++ b/pthread/pt-getattr.c
@@ -27,7 +27,7 @@
already running thread THREAD. It shall be called on an uninitialized ATTR
and destroyed with pthread_attr_destroy when no longer needed. */
int
-pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
+__pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
{
struct __pthread *pthread;
@@ -49,3 +49,4 @@ pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
return 0;
}
+weak_alias (__pthread_getattr_np, pthread_getattr_np)