cf_atomic_cas¶
Category: atomic
GitHub: cute_multithreading.h
Atomically sets atomic to value if expected equals atomic.
| Parameters | Description |
|---|---|
| atomic | The pointer to atomically manipulate. |
| expected | Used to compare against atomic. |
| value | A value to atomically set to atomic. |
Return Value¶
Returns success if the value was set, error otherwise.
Remarks¶
Atomics are an advanced topic. You've been warned! Beej has a good article on atomics.
Related Pages¶
cf_atomic_zero
cf_atomic_add
cf_atomic_set
cf_atomic_get
cf_atomic_ptr_cas
cf_atomic_ptr_set
cf_atomic_ptr_get