From: Oliver Kurth Date: Wed, 7 Feb 2018 00:32:38 +0000 (-0800) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-10.3.0~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ccc8b1a79bf76b9826c37b2133e5dbd4b9904dc;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index 8edfe5c84..94eaf1d31 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -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