]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)
committerOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:38 +0000 (16:32 -0800)
open-vm-tools/lib/include/vm_atomic.h

index 8edfe5c8405927f044f8fb81a3e948d1eb1dc9d1..94eaf1d31df598f55059c72b0305727a3f0aeffa 100644 (file)
@@ -3929,6 +3929,24 @@ Atomic_TestClearBitVector(Atomic_uint8 *var, // IN/OUT
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Atomic_TestBitVector --
+ *
+ *      Test the bit 'index' (zero-based) in bit vector var.
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE Bool
+Atomic_TestBitVector(const Atomic_uint8 *var, // IN
+                     unsigned index)          // IN
+{
+   uint8 bit = 1 << index % 8;
+   return (Atomic_Read8(var + index / 8) & bit) != 0;
+}
+
+
 #ifdef VM_ARM_64
 #   include "vm_atomic_arm64_end.h"
 #endif