This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Redefinition of PTHREAD_MUTEX_xxx
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Fri, 29 Jul 2011 15:45:44 -0500
- Subject: Redefinition of PTHREAD_MUTEX_xxx
Hi,
I noticed something I think is redundant
and useless in sys/types.h.
There is a block of code conditional
on XMK and RTEMS which defines
PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE,
PTHREAD_MUTEX_ERRORCHECK, and
#define PTHREAD_MUTEX_DEFAULT.
Later there is a block of code conditional
on _UNIX98_THREAD_MUTEX_ATTRIBUTES which
redefines them different values.
As best I can tell, both RTEMS and XMK
define _UNIX98_THREAD_MUTEX_ATTRIBUTES
so trip both blocks of code.
The first has comments on the constants
while the second (UNIX98) block does not.
With confirmation that both XMK and
RTEMS trip both blocks and the first is
useless, I propose the following:
+ move the comments from the first
to the second block
+ remove the first block
Can I get a doublecheck on the analysis
and then I will submit a patch.
Thanks.
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985