[PATCH 11/19] nptl: Add internal alias __pthread_getattr_default_np

Carlos O'Donell carlos@redhat.com
Tue Jun 2 03:28:03 GMT 2020


On 5/19/20 6:44 AM, Florian Weimer via Libc-alpha wrote:

OK for master.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  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;

OK.

>    }
>  }
>  
> 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)

OK.

>  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 <pthreadP.h>
>  
>  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)

OK.

> 


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list