[PATCH] Clean pthread types namespaces on x86 and x86_64
Juan Manuel Torres Palma
j.m.torrespalma@gmail.com
Tue Jun 23 21:46:00 GMT 2015
This patch creates the file bits/pthread_ct.h which contains types
pthread_mutex_t and pthread_cond_t, that were previously in
pthreadtypes.h. The actual structure declaration
is in pthread_st.h, that stands for specific types, so now when
creating mtx_t and cnd_t structs, namespaces won't be corrupted.
It's my first ever patch so I wanted it to be a small one. A few more
are coming in the next couple days. I'm not sure if the patch format
is ok, if it isn't let me know and how to fix it. I attach the
changelog too because gmail doesn't allow me to use tabs here.
Cheers.
Tested for x86_64.
2015-06-23 Juan Manuel Torres Palma <jmtorrespalma@gmail.com>
* posix/Makefile (headers): Add files bits/pthread_ct.h and
bits/pthread_st.h to this variable.
* bits/pthread_ct: New file.
(pthread_mutex_t): Move struct definition.
(pthread_cond_t): Likewise.
* sysdeps/x86/bits/pthread_st.h: New file.
(__SIZEOF_PTHREAD_MUTEX_T): Definition.
(__SIZEOF_PTHREAD_COND_T): Likewise.
(__pthread_list_t) [__x86_64__]: Likewise.
(__pthread_slist_t) [!__x86_64__]: Likewise.
(__pthread_mutex_s): Likewise.
(__PTHREAD_MUTEX_T_CONTENT): Likewise.
(__PTHREAD_COND_T_CONTENT): Likewise.
(__PTHREAD_MUTEX_HAVE_PREV)[__x86_64__]: Likewise
(__elision)[!__x86_64__]: Likewise
(__spins)[!__x86_64__]: Likewise
(__PTHREAD_SPINS): Likewise
* sysdeps/x86/bits/pthread_st.h: Include <bits/pthread_ct.h>.
(__SIZEOF_PTHREAD_MUTEX_T): Remove.
(__SIZEOF_PTHREAD_COND_T): Likewise.
(__pthread_list_t): Likewise.
(__pthread_slist_t): Likewise.
(__pthread_mutex_s): Likewise.
(__PTHREAD_MUTEX_T_CONTENT): Likewise.
(__PTHREAD_COND_T_CONTENT): Likewise.
(__PTHREAD_MUTEX_HAVE_PREV): Likewise
(__elision): Likewise
(__spins): Likewise
(__PTHREAD_SPINS): Likewise
--
Juan Manuel Torres Palma.
Computer Science Student at Universidad de Granada.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clean-pthread-types-namespaces-on-x86-and-x86_64.patch
Type: text/x-patch
Size: 10232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150623/5d409e56/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog-0001
Type: application/octet-stream
Size: 1170 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150623/5d409e56/attachment.obj>
More information about the Libc-alpha
mailing list