This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [review v2] nptl: Add struct_mutex.h
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <gnutoolchain-gerrit at osci dot io>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, <libc-alpha at sourceware dot org>, Florian Weimer <fweimer at redhat dot com>
- Date: Thu, 14 Nov 2019 20:43:16 +0000
- Subject: Re: [review v2] nptl: Add struct_mutex.h
- Ironport-sdr: 80EpYDffuyKVuhU2L3uDOGZPMGbxLgJecbmGdcu++cJUkbyL2sCT7UBFdCgt2UWg862hVIVX7y qJXE3wzkzgby4mLlX6zUENFZzAU2jx8KcUAonxD00eeWfKXxTtbuiUP7QHvKmDSO/CSry7PTZM YG9ZhdwI6TLMbKmPdsxpN461BrkTKbnUtVlSsNJflKus+3dJxawWxvuZaXmb6DZgT1nvTh4lko hpc8YvzR2svoas1rLGGkGoMu/icO7tLcEvJyEYV1ehfhc1c36ZIvxa1F30Rai+fhPphJbZBZRw RpE=
- Ironport-sdr: 76JB0kJg/DpaM7AioSWSrZNW6FgwORq8kbhc7DqpKmkpVFT+5YXgetl8NKIPX8gvu+dJThUn3Y TkKOas8jk91glPy7YV13FoOR4I5x5iwhrFsGoghqijBZ7z5H034zuTlL7RBE+oyOzLsyAQ2FZ0 5J4EvOV/BL4v0vk+LJDjH+py9+YMS6yM4aGoPK69nCX8kpuTYkscXP4A1qpQI8fwGA7FOjltK6 BZ9ZYbZw1IzSUOjBneceQ/ZGUyuQ8TzBy5Hbm0hZl2d2QcZeWkQrwT6RRKjzS76sAkHKAB8Vtd 71Q=
- References: <gerrit.1573136666000.I30a22c3e3497805fd6e52994c5925897cffcfe13@gnutoolchain-gerrit.osci.io> <20191114143705.0797120AF6@gnutoolchain-gerrit.osci.io>
On Thu, 14 Nov 2019, Florian Weimer (Code Review) wrote:
> __LOCK_ALIGNMENT should probably removed (replaced by arch-specific
> headers) because it makes the types ABI-incompatible if a non-GNU
> compiler used (missing __attribute__ support). So we really should
> not encourage its use. But this is separate change.
The list of compiler extensions required to use glibc headers
(<https://sourceware.org/glibc/wiki/CCompilerFeatures>) is certainly
incomplete. Alignment attributes are used in installed headers on various
architectures for a range of things beyond just pthreads headers.
It's possible it would be possible to use _Alignas / alignas in some cases
with suitable language standard versions, subject to any issues with
bounds on supported alignment with those keywords (see e.g.
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89357>)
> --
> Gerrit-Project: glibc
> Gerrit-Branch: master
> Gerrit-Change-Id: I30a22c3e3497805fd6e52994c5925897cffcfe13
> Gerrit-Change-Number: 518
> Gerrit-PatchSet: 2
> Gerrit-Owner: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> Gerrit-Reviewer: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
> Gerrit-Comment-Date: Thu, 14 Nov 2019 14:37:04 +0000
> Gerrit-HasComments: Yes
> Gerrit-Has-Labels: No
> Gerrit-MessageType: comment
--
Joseph S. Myers
joseph@codesourcery.com