Sign in Join
FPDoc Onlineexperiment

InterlockedExchangeAdd function

In unit System

Thread-safe add and exchange of 2 values.

Declaration

pascal
function InterlockedExchangeAdd(var Target: LongInt; Source: LongInt)
: LongInt

Description

InterLockedExchangeAdd adds to Target the value of Source in a thread-safe way, and returns the old value of Target.This is done in a thread-safe way, i.e., only one processor is accessing the Target variable at a time.

Errors

None.

See also

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