]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
vm_atomic.h: Build Atomic_uint128 upon uint128 instead of __int128
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:30 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:30 +0000 (11:23 -0700)
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.

open-vm-tools/lib/include/vm_atomic.h

index e33a829c46895315a3655e346d2e1a62257b260d..6c9df80b3fa52089ba339738605412a5f487fc1b 100644 (file)
@@ -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;