From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:30 +0000 (-0700) Subject: vm_{atomic,uninterruptible}.h: Consistency cleanup X-Git-Tag: stable-10.2.0~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1721610e10cd7cc5f1009f608d7a2b12e5bfb54;p=thirdparty%2Fopen-vm-tools.git vm_{atomic,uninterruptible}.h: Consistency cleanup 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. --- diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index 6c9df80b3..caf1dc486 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -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__ }