]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
vm_{atomic,uninterruptible}.h: Consistency cleanup
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)
This change brings a few dissidents back in line with the rest of the code.

Also deleted Uninterruptible_FetchAndAdd64():
o It was unused.
o It provided the same functionality as Uninterruptible_ReadAdd64(), with a worse name and implementation.

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

index 6c9df80b3fa52089ba339738605412a5f487fc1b..caf1dc486db6e7a9149b5b552be49100a33fce26 100644 (file)
@@ -211,6 +211,8 @@ Atomic_VolatileToAtomic(volatile uint32 *var)  // IN:
 {
    return (Atomic_uint32 *)var;
 }
+#define Atomic_VolatileToAtomic32 Atomic_VolatileToAtomic
+
 
 /* Convert a volatile uint64 to Atomic_uint64. */
 static INLINE Atomic_uint64 *
@@ -2230,7 +2232,7 @@ Atomic_CMPXCHG32(Atomic_uint32 *var,   // IN/OUT
    return equal;
 #endif /* VM_X86_ANY */
 #else // defined __GNUC__
-   return (Atomic_ReadIfEqualWrite(var, oldVal, newVal) == oldVal);
+   return Atomic_ReadIfEqualWrite(var, oldVal, newVal) == oldVal;
 #endif // !defined __GNUC__
 }