Skip to content

MTY_Atomic32Add

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Add to a 32-bit integer atomically.

All atomic operations in libmatoya create a full memory barrier.

int32_t MTY_Atomic32Add(
    MTY_Atomic32 * atomic,
    int32_t        value
);

Parameters

atomic (MTY_Atomic32 *)

An MTY_Atomic32.

value (int32_t)

Value to atomically add. This value can be negative, effectively performing subtraction.

Return value

int32_t

The result of the addition.

Platform support

Windows   macOS   Android   Linux  

See also

Module: Thread

Clone this wiki locally