This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]
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.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."