_interlockedbittestandreset, _interlockedbittestandreset64
Microsoft Specific
Generate the lock_btr instruction, which examines bit b of the address a and returns its current value.
unsigned char _interlockedbittestandreset(
long *a,
long b
);
unsigned char _interlockedbittestandreset64(
__int64 *a,
__int64 b
);
Parameters
[in] a
A pointer to the memory to examine.[in] b
The bit position to test.
Return Value
The bit at the position specified.
Requirements
Intrinsic |
Architecture |
---|---|
_interlockedbittestandreset |
x86, x64 |
_interlockedbittestandreset64 |
x64 |
Header file <intrin.h>
Remarks
As a result of the lock_btr instruction, the bit is set to zero. The operation is atomic.
In Visual C++ 2005, these functions behave as read-write memory barriers. For more information, see _ReadWriteBarrier.
This routine is only available as an intrinsic.