Atomic_{8,16,32,64} are built upon uint{8,16,32,64}.
Atomic_uint128 is built upon __int128, which is inconsistent.
This change builds it upon uint128 instead.
#if defined __GNUC__ && defined VM_64BIT && \
(defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 || defined VM_ARM_64)
typedef struct Atomic_uint128 {
- volatile __int128 value;
+ volatile uint128 value;
} Atomic_uint128 ALIGNED(16);
#endif
*/
#if defined __GNUC__ && defined VM_64BIT && \
(defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 || defined VM_ARM_64)
-static INLINE __int128
+static INLINE uint128
Atomic_ReadIfEqualWrite128(Atomic_uint128 *ptr, // IN/OUT
- __int128 oldVal, // IN
- __int128 newVal) // IN
+ uint128 oldVal, // IN
+ uint128 newVal) // IN
{
#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
return __sync_val_compare_and_swap(&ptr->value, oldVal, newVal);
#elif defined VM_ARM_64
union {
- __int128 raw;
+ uint128 raw;
struct {
uint64 lo;
uint64 hi;