[PATCH] Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Oct 18 11:06:00 GMT 2017



On 18/10/2017 06:21, Andreas Schwab wrote:
> On Okt 17 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
> 
>> 2.  Define __PTHREAD_SPINS_DATA_IN_STRUCT to control
>> __PTHREAD_SPINS_DATA
>> 3. __PTHREAD_MUTEX_NUSERS_BEFORE_KIND to control where to
>> put __nusers.
> 
> Yes, this looks like the right approach.  Though I would define the
> macros in a way so that defining them to 0 results in the preferred
> layout for future architectures (thus __PTHREAD_MUTEX_NUSERS_AFTER_KIND
> instead of __PTHREAD_MUTEX_NUSERS_BEFORE_KIND).
> __PTHREAD_SPINS_DATA_IN_STRUCT could then imply
> __PTHREAD_MUTEX_HAVE_PREV as before, since both are only needed due to
> space constraints for linuxthreads compatibility (perhaps rename it to
> __PTHREAD_MUTEX_USE_UNION?).
> 
> Andreas.
> 

Alright, I will adapt my first submission to follow this.



More information about the Libc-alpha mailing list