InterlockedIncrement¶
Thread-safe increment.
Declaration¶
Source position: systemh.inc line 1639
function InterlockedIncrement(var Target: LongInt) : LongInt;
function InterlockedIncrement(var Target: Pointer) : Pointer;external name 'FPC_INTERLOCKEDINCREMENT64';
function InterlockedIncrement(var Target: Cardinal) : Cardinal;external name 'FPC_INTERLOCKEDINCREMENT';
Description¶
InterLockedIncrement increments Target with 1 and returns the result. This is done in a thread-safe way (i.e. only one processor is accessing the variable at a time).
Errors¶
None.
See also¶
| Name | Description |
|---|---|
| InterLockedDecrement | Thread-safe decrement. |
| InterLockedExchange | Exchange 2 integers in a thread-safe way. |
| InterLockedExchangeAdd | Thread-safe add and exchange of 2 values. |
| InterlockedCompareExchange | Conditional exchange. |