source: trunk/third/gstreamer/gst/gstatomic.h @ 21005

Revision 21005, 1.5 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21004, which included commits to RCS files with non-trunk default branches.
Line 
1/* GStreamer
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20#ifndef __GST_ATOMIC_H__
21#define __GST_ATOMIC_H__
22
23#include <glib.h>
24
25G_BEGIN_DECLS
26
27typedef volatile gint gst_vgint;        /* gtk-doc volatile workaround */
28
29typedef struct _GstAtomicInt GstAtomicInt;
30
31struct _GstAtomicInt {
32  gst_vgint     counter;
33  GMutex        *lock;          /* for C fallback */
34};
35
36
37void            gst_atomic_int_init             (GstAtomicInt *aint, gint val);
38void            gst_atomic_int_destroy          (GstAtomicInt *aint);
39void            gst_atomic_int_set              (GstAtomicInt *aint, gint val);
40gint            gst_atomic_int_read             (GstAtomicInt *aint);
41void            gst_atomic_int_add              (GstAtomicInt *aint, gint val);
42void            gst_atomic_int_inc              (GstAtomicInt *aint);
43gboolean        gst_atomic_int_dec_and_test     (GstAtomicInt *aint);
44
45
46G_END_DECLS
47
48#endif /*  __GST_ATOMIC_H__ */
Note: See TracBrowser for help on using the repository browser.