Atomic

Atomic functions

int32_atomic_t

32 bit signed integer atomic

32 bit signed integer atomic


dmAtomicIncrement32(ptr)

Atomic increment of an int32_atomic_t.

Atomic increment of an int32_atomic_t.

PARAMETERS

ptr - Pointer to an int32_atomic_t to increment.

RETURN

prev - Previous value


dmAtomicDecrement32(ptr)

Atomic decrement of an int32_atomic_t.

Atomic decrement of an int32_atomic_t.

PARAMETERS

ptr - Pointer to an int32_atomic_t to decrement.

RETURN

prev - Previous value


dmAtomicAdd32(ptr, value)

Atomic addition of an int32_atomic_t.

Atomic addition of an int32_atomic_t.

PARAMETERS

ptr - Pointer to an int32_atomic_t to add to.

value - Value to add.

RETURN

prev - Previous value


dmAtomicSub32(ptr, value)

Atomic subtraction of an int32_atomic_t.

Atomic subtraction of an int32_atomic_t.

PARAMETERS

ptr - Pointer to an int32_atomic_t to subtract from.

value - Value to subtract.

RETURN

prev - Previous value


dmAtomicStore32(ptr, value)

Atomic set (or exchange) of an int32_atomic_t.

Atomic set (or exchange) of an int32_atomic_t.

PARAMETERS

ptr - Pointer to an int32_atomic_t to store into.

value - Value to set.

RETURN

prev - Previous value


dmAtomicCompareStore32(ptr, value, comparand)

Atomic set (or exchange) of an int32_atomic_t if c...

Atomic set (or exchange) of an int32_atomic_t if comparand is equal to the value of ptr.

PARAMETERS

ptr - Pointer to an int32_atomic_t to store into.

value - Value to set.

comparand - Value to compare to.

RETURN

prev - Previous value


dmAtomicGet32(ptr)

Atomic get of an int32_atomic_t

Atomic get of an int32_atomic_t

PARAMETERS

ptr - Pointer to an int32_atomic_t to get from.

RETURN

value - Current value