TypeScript API Documentation for GLIB
API Version: 2.0
Library Version: 2.88.0
Generated with TypeDoc via ts-for-gir v4.0.0-beta.41
Since 2.74
Sets the atomic to newval and returns the old value from atomic.
atomic
newval
This exchange is done atomically.
Think of this operation as an atomic version of { tmp = *atomic; *atomic = val; return tmp; }.
{ tmp = *atomic; *atomic = val; return tmp; }
This call acts as a full compiler and hardware memory barrier.
a pointer to a gint or guint
gint
guint
the value to replace with
the value of atomic before the exchange, signed
2.74
Sets the
atomictonewvaland returns the old value fromatomic.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.