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

H.J. Lu hjl.tools@gmail.com
Wed Oct 18 12:35:00 GMT 2017


On Wed, Oct 18, 2017 at 4:06 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
> 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.

Please use a separate patch to check offsets which should be backported
to 2.25 branch.

-- 
H.J.



More information about the Libc-alpha mailing list