mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
1211e26e59
Original commit message from CVS: docs fixes: comment macros in templates, not in headers (stupid gtk-doc)
93 lines
1.9 KiB
Text
93 lines
1.9 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>
|
|
|
|
<!-- ##### 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
|
|
|
|
|