[PATCH] Clean pthread functions namespace for C11 threads
Juan Manuel Torres Palma
j.m.torrespalma@gmail.com
Fri Jun 26 11:52:00 GMT 2015
This patch creates weak aliases for all conflicting functions with
C11 threads.h functions, allowong user to redefine them. Some functions
do not need aliases as they have already been defined as versioned
symbols.
Cheers.
* nptl/pthreadP.h (__pthread_mutex_timedlock, __pthread_key_delete)
(__pthread_detach, __pthread_join): Add functions prototypes.
* 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.
* nptl/pthread_getspecific.c (pthread_getspecific): Likewise.
* 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_self.c (pthread_self): Likewise.
* nptl/pthread_setspecific.c (pthread_setspecific): Likewise.
--
Juan Manuel Torres Palma.
Computer Science Student at Universidad de Granada.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog-0002
Type: application/octet-stream
Size: 1696 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150626/da1b9562/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clean-pthread-functions.patch
Type: text/x-patch
Size: 8440 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150626/da1b9562/attachment.bin>
More information about the Libc-alpha
mailing list