This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 2/5] Clean pthread functions namespaces for C11 threads
- From: Matt Turner <mattst88 at gmail dot com>
- To: Juan Manuel Torres Palma <j dot m dot torrespalma at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 23 Nov 2015 21:02:56 -0800
- Subject: Re: [PATCH v2 2/5] Clean pthread functions namespaces for C11 threads
- Authentication-results: sourceware.org; auth=none
- References: <1440515272-9453-1-git-send-email-j dot m dot torrespalma at gmail dot com> <1440515272-9453-3-git-send-email-j dot m dot torrespalma at gmail dot com>
On Tue, Aug 25, 2015 at 8:07 AM, Juan Manuel Torres Palma
<j.m.torrespalma@gmail.com> wrote:
> This patch creates weak aliases for all conflicting functions with
> C11 threads.h functions, allowing user to redefine them. Some
> functions do not need aliases as they have already been defined as
> versioned symbols.
>
> 2015-08-25 Juan Manuel Torres Palma <jmtorrespalma@gmail.com>
>
> Clean pthread functions namespaces for C11 threads
>
> This patch creates weak aliases for all conflicting functions with
> C11 threads.h functions, allowing user to redefine them. Some functions
> do not need aliases as they have already been defined as versioned
> symbols.
>
> * misc/Versions (__mmap, __munmap, __mprotect): Export private
> symbols for calls from libpthread.
> * nptl/allocatestack.c: Modify calls to mmap, munmap and mprotect
> to namespace safe versions __mmap, __munmap and __mprotect.
> * nptl/pthreadP.h (__pthread_mutex_timedlock, __pthread_key_delete)
> (__pthread_detach, __pthread_join, __pthread_cancel): Add functions
> prototypes.
> * nptl/pthread_cancel.c (__pthread_cancel): Change static
> requirements.
> (pthread_cancel): Declare as weak alias.
> * nptl/pthread_create.c: Change static requirements.
> * nptl/pthread_detach.c (pthread_detach): Declare as weak alias.
> (__pthread_detach): Rename pthread_detach function.
> * nptl/pthread_equal.c (pthread_equal): Declare as weak alias.
> * nptl/pthread_exit.c (pthread_exit): Likewise.
> (__pthread_exit): Change static requirements.
> * nptl/pthread_getspecific.c (pthread_getspecific): Declare as weak
> alias.
> * nptl/pthread_join.c (pthread_join): Declare as weak alias.
> (__pthread_join): Rename pthread_join function.
> * nptl/pthread_key_create.c (pthread_key_create):
> Declare as weak alias.
> * nptl/pthread_key_delete.c (pthread_key_delete):
> Declare as weak alias.
> (__pthread_key_delete): Rename pthread_key_delete function.
> * nptl/pthread_mutex_destroy.c (pthread_mutex_destroy):
> Declare as weak alias.
> * nptl/pthread_mutex_init.c (pthread_mutex_init): Likewise.
> * nptl/pthread_mutex_lock.c (pthread_mutex_lock): Likewise.
> * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
> (__pthread_mutex_timedlock): Rename pthread_mutex_timedlock function.
> * nptl/pthread_mutex_trylock.c (pthread_mutex_trylock):
> Declare as weak alias.
> * nptl/pthread_mutex_unlock.c (pthread_mutex_unlock): Likewise.
> * nptl/pthread_mutexattr_init.c (pthread_mutexattr_init): Likewise.
> * nptl/pthread_mutexattr_settype.c
> (pthread_mutexattr_init): Likewise.
Aren't we missing pthread_mutexattr_destroy?