-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_Atomic64CAS
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Compare two 64-bit values and if the same, atomically set to a new value.
All atomic operations in libmatoya
create a full memory barrier.
bool MTY_Atomic64CAS(
MTY_Atomic64 * atomic,
int64_t oldValue,
int64_t newValue
);
atomic
(MTY_Atomic64 *
)
An MTY_Atomic64
.
oldValue
(int64_t
)
Value to compare against the atomic.
newValue
(int64_t
)
Value the atomic is set to if oldValue
matches the atomic.
bool
If the atomic is set to newValue
, returns true
, otherwise false
.