This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove __PTHREAD_MUTEX_HAVE_ELISION undefined warning


On Wed, 2014-03-26 at 17:29 -0300, Adhemerval Zanella wrote:
> On 26-03-2014 14:50, Roland McGrath wrote:
> > I don't understand what "support for 64 bits" or "support for 32 bits"
> > means.  OK, I've looked at bits/pthreadtypes.h so I do understand.  But it
> > seems pretty wrong to pretend this is a generic 32/64 sort of thing when it
> > is really just about the x86-private layout of pthread_mutex_t.  It seems
> > more proper to have bits/pthreadtypes.h just define __PTHREAD_SPINS.  
> >
> > That can be a separate cleanup if you want, and others may want to kibitz.
> > But that might involve dropping the header you're adding here, so maybe you
> > want to just resolve it now.
> >
> > If you want to go ahead with this change, then it's OK with the other nits
> > above and this comment rewritten to describe concretely what the macro
> > means.  In actual usage so far, it doesn't actually mean anything about
> > elision support per se.  It just means something about how the fields of
> > pthread_mutex_t are structured and hence what the initializer must look like.
> > If that's all it's for, it should be made clear.
> >
> Cleanup up the whole __PTHREAD_SPINS seems the appropriated measure.  This patch
> moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t
> layout is also arch specific and does not make sense disassociate them.
> This makes the definition of __PTHREAD_MUTEX_HAVE_ELISION not required.

I know I'm late with this comment, but I would have preferred if this
was called __PTHREAD_MUTEX_SPINS or something like this.  It's not a
generic spinning-related thing.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]