This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove __PTHREAD_MUTEX_HAVE_ELISION undefined warning
- From: Torvald Riegel <triegel at redhat dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 11 Apr 2014 22:08:09 +0200
- Subject: Re: [PATCH] Remove __PTHREAD_MUTEX_HAVE_ELISION undefined warning
- Authentication-results: sourceware.org; auth=none
- References: <5332D913 dot 5050903 at linux dot vnet dot ibm dot com> <20140326163647 dot 3E42A74493 at topped-with-meat dot com> <53330F3B dot 6090009 at linux dot vnet dot ibm dot com> <20140326175007 dot D832074496 at topped-with-meat dot com> <533338C4 dot 5030107 at linux dot vnet dot ibm dot com>
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.