Initialize Tizen 2.3
[framework/multimedia/gst-openmax.git] / wearable / util / sem.h
1 /*
2  * Copyright (C) 2008-2009 Nokia Corporation.
3  *
4  * Author: Felipe Contreras <felipe.contreras@nokia.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation
9  * version 2.1 of the License.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef SEM_H
23 #define SEM_H
24
25 #include <glib.h>
26
27 typedef struct GSem GSem;
28
29 struct GSem
30 {
31   GCond *condition;
32   GMutex *mutex;
33   gint counter;
34 };
35
36 GSem *g_sem_new (void);
37 void g_sem_free (GSem * sem);
38 void g_sem_down (GSem * sem);
39 void g_sem_up (GSem * sem);
40
41 #endif /* SEM_H */