[PATCH v3] x32: Align sem_t to 8 bytes [BZ #33632]
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Tue Nov 18 14:45:41 GMT 2025
Hi HJ,
> Change x32 sem_t to
>
> typedef union
> {
> char __size[16];
> long long int __align;
> } sem_t;
>
> to align it to 8 bytes so that the future x32 binaries will always use
> 64-bit atomic operations on aligned sem_t. Behavior of the existing x32
> binaries is unchanged.
That's an ABI break. Also I don't see how the behaviour of existing x32 binaries
is unchanged - they use unaligned sem_t and thus reintroduce the bug.
I think the previous version looked alright. And before trying to make things
more hackish, why don't we first quantify the benefit? Is there a benchmark that
shows clear performance gains with 64-bit atomics when using semaphores?
Cheers,
Wilco
More information about the Libc-alpha
mailing list