mirror of
https://github.com/apple/swift-atomics
synced 2026-11-28 04:54:21 +00:00
Unify the double word path by using a bit more macro expansion. The two differences between 32-bit and 64-bit is: - `__uint128_t` vs `uint64_t` - 64-bit shifts vs 32-bit shifts We can simply use a macro to expand out the underlying C type rather than bifurcating the definitions. For the second difference, we can simply use the `__INTPTR_WIDTH__` for the shifts. We explicitly use macros for the type-definitions to hide the typedef from Swift. Use the C11 aggregate constructor to further reduce the code.