Function
GLibatomic_pointer_exchange
since: 2.74
Declaration [src]
gpointer
g_atomic_pointer_exchange (
void* atomic,
gpointer newval
)
Description [src]
Sets the atomic
to newval
and returns the old value from atomic
.
This exchange is done atomically.
Think of this operation as an atomic version of
{ tmp = *atomic; *atomic = val; return tmp; }
.
This call acts as a full compiler and hardware memory barrier.
Available since: 2.74