From dd05e154accfd3b9cd5984fa8419ffbd4edd90da Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 15 May 2020 22:49:46 +0200 Subject: nptl: Add internal alias __pthread_getattr_default_np Reviewed-by: Carlos O'Donell --- nptl/Versions | 1 + nptl/pthreadP.h | 2 ++ nptl/pthread_getattr_default_np.c | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nptl/Versions b/nptl/Versions index 4c7b43354d..e4696c128f 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -61,6 +61,7 @@ libc { __pthread_attr_setaffinity_np; __pthread_attr_init; __pthread_attr_destroy; __pthread_attr_copy; + __pthread_getattr_default_np; } } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 41b693d034..9c6dd41b7c 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -437,6 +437,8 @@ extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_setaffinity_np (pthread_attr_t *, size_t, const cpu_set_t *); libc_hidden_proto (__pthread_attr_setaffinity_np) +extern __typeof (pthread_getattr_default_np) __pthread_getattr_default_np; +libpthread_hidden_proto (__pthread_getattr_default_np) extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr); diff --git a/nptl/pthread_getattr_default_np.c b/nptl/pthread_getattr_default_np.c index a9665c5df7..5c99f980e2 100644 --- a/nptl/pthread_getattr_default_np.c +++ b/nptl/pthread_getattr_default_np.c @@ -19,7 +19,7 @@ #include int -pthread_getattr_default_np (pthread_attr_t *out) +__pthread_getattr_default_np (pthread_attr_t *out) { lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); int ret = __pthread_attr_copy (out, @@ -27,3 +27,5 @@ pthread_getattr_default_np (pthread_attr_t *out) lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); return ret; } +libpthread_hidden_def (__pthread_getattr_default_np) +weak_alias (__pthread_getattr_default_np, pthread_getattr_default_np) -- cgit 1.4.1