Sign in Join
FPDoc Onlineexperiment

InterlockedCompareExchangePointer function

In unit System

Compare pointers in an atomic operation.

Declaration

pascal
function InterlockedCompareExchangePointer(var Target: Pointer; 
 NewValue: Pointer; 
 Comperand: Pointer): Pointer

Description

InterlockedCompareExchangePointer compares Comparand with Target. if they are equal, replaces Target with NewValue. This is done in a single atomic operation.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.