System.SyncObjs.TInterlocked.BitTestAndSet
Delphi
class function BitTestAndSet(var Target: Integer; BitOffset: TBitOffset): Boolean; static;
C++
static bool __fastcall BitTestAndSet(int &Target, TBitOffset BitOffset);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TInterlocked |
Description
Tests whether a certain bit in a variable is set to 1 and sets its value to 1.
BitTestAndSet tests whether a certain bit in a variable is set to 1 and sets its value to 1. BitOffset specifies which bit of the Target parameter will be tested. The method returns True if the bit is 1, False otherwise. Additionally, the bit is set to 1 regardless of its value.