From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:30 +0000 (-0700) Subject: vm_atomic.h: Build Atomic_uint128 upon uint128 instead of __int128 X-Git-Tag: stable-10.2.0~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5034d1fb0aef6455a79d719c2f97ccf7f44c831a;p=thirdparty%2Fopen-vm-tools.git vm_atomic.h: Build Atomic_uint128 upon uint128 instead of __int128 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. --- diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index e33a829c4..6c9df80b3 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -111,7 +111,7 @@ typedef struct Atomic_uint64 { #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 @@ -287,16 +287,16 @@ extern int AtomicUndefined(void const *); */ #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;