Redefinition of PTHREAD_MUTEX_xxx
Tue Aug 2 11:16:00 GMT 2011
On Aug 1 08:33, Joel Sherrill wrote:
> On 08/01/2011 07:09 AM, Corinna Vinschen wrote:
> >On Jul 29 15:45, Joel Sherrill wrote:
> >>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.
> >I have a deja-vu...
> >Right, this has been discussed already on this list, see the thread
> >starting here:
> I wonder how I slept through that. Apparently
> I rediscovered it with my clang experiments.
> >So, given http://sourceware.org/ml/newlib/2011/msg00103.html
> >we're still waiting for a reply from Ralf.
> I am happy with Sebastian's patch to sys/types.h.
> It is what I had in mind.
> If you are OK with it for XMK, it is OK for RTEMS.
> >Ralf? Could you please have a look?
I don't know anything about XMK but AFAICS you're right, XMK as
well as RTEMS define _UNIX98_THREAD_MUTEX_ATTRIBUTES, even if in
different files. I have no problems if you or Ralf check in a
Cygwin Project Co-Leader
More information about the Newlib