Skip to content

cf_atomic_ptr_set

Category: atomic
GitHub: cute_multithreading.h


Atomically sets atomic to value and returns the old value from atomic.

void* cf_atomic_ptr_set(void** atomic, void* value);
Parameters Description
atomic The pointer to atomically manipulate.
value A value to atomically set to atomic.

Remarks

Atomics are an advanced topic. You've been warned! Beej has a good article on atomics.

cf_atomic_zero
cf_atomic_add
cf_atomic_set
cf_atomic_get
cf_atomic_cas
cf_atomic_ptr_cas
cf_atomic_ptr_get