gstreamer/docs/gst/tmpl/gstatomic.sgml
Thomas Vander Stichele f1a720a4cb removing added dirs
Original commit message from CVS:
removing added dirs
2005-12-16 18:29:42 +00:00

102 lines
2 KiB
Text

<!-- ##### SECTION Title ##### -->
GstAtomic
<!-- ##### SECTION Short_Description ##### -->
Functions that implement atomic operations.
<!-- ##### SECTION Long_Description ##### -->
<para>
Functions that implement atomic operations on a #GstAtomicInt structure.
Atomic operations are thread safe and don't use heavyweight locking mechanisms.
</para>
<para>
These functions will be inlined in the GStreamer core but are available to plugins
as external methods.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstMemChunk
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### TYPEDEF gst_vgint ##### -->
<para>
</para>
<!-- ##### STRUCT GstAtomicInt ##### -->
<para>
A structure that contains an integer that can be modified
atomically.
</para>
@counter:
@lock:
<!-- ##### FUNCTION gst_atomic_int_init ##### -->
<para>
Initialize an allocated #GstAtomicInt with a value. Call this method
only once as it will allocate a mutex in the C-fallback case.
</para>
@aint: a #GstAtomicInt
@val: a new value
<!-- ##### FUNCTION gst_atomic_int_destroy ##### -->
<para>
Destroy a #GstAtomicInt. Call this method only once as it will
free the mutex in the C-fallback case.
</para>
@aint: a #GstAtomicInt
<!-- ##### FUNCTION gst_atomic_int_set ##### -->
<para>
Atomically set the value on the #GstAtomicInt.
</para>
@aint: a #GstAtomicInt
@val: The new value
<!-- ##### FUNCTION gst_atomic_int_read ##### -->
<para>
Atomically read the contents of a #GstAtomicInt
</para>
@aint: a #GstAtomicInt
@Returns: the value of the atomic int
<!-- ##### FUNCTION gst_atomic_int_add ##### -->
<para>
Atomically add the given value to the #GstAtomicInt.
</para>
@aint: a #GstAtomicInt
@val: the value to add
<!-- ##### FUNCTION gst_atomic_int_inc ##### -->
<para>
Atomically increment the #GstAtomicInt
</para>
@aint: a #GstAtomicInt
<!-- ##### FUNCTION gst_atomic_int_dec_and_test ##### -->
<para>
Atomically decrement the #GstAtomicInt and test if it is zero.
</para>
@aint: a #GstAtomicInt
@Returns: TRUE if the atomic int is 0