GstAtomic
Macros that implement atomic operations
GstAtomic contains a set of macros that can be used to implement
atomic algorithms that are thread safe and don't use heavyweight
locking mechanisms.
#GstMemChunk
A structure that contains an integer that can be modified
atomically.
Initialize an atomic int
@ref: a reference to a #GstAtomicInt
@val: The initial value for the integer
Free the memory allocated by #GST_ATOMIC_INT_INIT
@ref: A reference to a #GstAtomicInt
Set the value of a #GstAtomicInt atomically
@ref: a reference to a #GstAtomicInt
@val: The value for the integer
Get the value of a #GstAtomicInt atomically
@ref: a reference to a #GstAtomicInt
Get the value of a #GstAtomicInt atomically into a variable
@ref: a reference to a #GstAtomicInt
@res: a pointer to a gint to hold the value
Increment the value of a #GstAtomicInt atomically
@ref: a reference to a #GstAtomicInt
Decrement the value of a #GstAtomicInt atomically and test
for zero.
@ref: a reference to a #GstAtomicInt
@zero: a gpointer to a gboolean to hold the value of the test
Atomically add a value to a #GstAtomicInt
@ref: a reference to a #GstAtomicInt
@count: The value to add
The structure to handle values that can be swapped atomically
@lock:
Get the value of a #GstAtomicSwap
@swap: a reference to a #GstAtomicSwap
Initialize an atomic swap structure
@swap: a reference to a #GstAtomicSwap
@val: the initial value
Atomically swap the value of the #GstAtomicSwap with a new value
@swap: a reference to a #GstAtomicSwap
@val: the new value
Atomically swap the value of the #GstAtomicSwap with a new value and
get the old value.
@swap: a reference to a #GstAtomicSwap
@val: the new value
@res: the old value