System.SyncObjs.TInterlocked.BitTestAndSet

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function BitTestAndSet(var Target: Integer; BitOffset: TBitOffset): Boolean; static; {$IF not Defined(X86ASM) and not Defined(X64ASM)} inline; {$ENDIF}

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.

See Also