The SysV ABI defined uint64_t with 4 byte alignment on i386 — so we can’t just assume that the integer types will have the right alignment for atomics out of the box.
Emulate the original _Atomic<Width>Storage types from the old C shims even in native atomics configuration, so that they can carry a custom @_alignment attribute.
Change things up so that these storage types define atomic operations taking and returning themselves, rather than some standard scalar type. This gets things a little closer in spirit to what we're planning to do in the stdlib, and it really cuts down the size of the gyb output for the native definitions.
The SysV ABI defined
uint64_t
with 4 byte alignment on i386 — so we can’t just assume that the integer types will have the right alignment for atomics out of the box.Emulate the original
_Atomic<Width>Storage
types from the old C shims even in native atomics configuration, so that they can carry a custom@_alignment
attribute.Change things up so that these storage types define atomic operations taking and returning themselves, rather than some standard scalar type. This gets things a little closer in spirit to what we're planning to do in the stdlib, and it really cuts down the size of the gyb output for the native definitions.
Resolves #99.
Checklist