Skip to content

InterlockedCompareExchangePointer

Compare pointers in an atomic operation.

Declaration

Source position: systemh.inc line 1673

function InterlockedCompareExchangePointer(var Target: Pointer; 
                                          NewValue: Pointer; 
                                          Comperand: Pointer) : Pointer;external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';

Description

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

See also

Name Description
InterlockedCompareExchange Conditional exchange.