Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1655 giacomo 1
 
2
#ifndef __GRXMUTEX_H
3
#define __GRXMUTEX_H
4
 
5
#include "config.h"
6
 
7
#ifdef GRXMUTEX
8
 
9
#include <kernel/int_sem.h>
10
 
11
#define g_sem_t internal_sem_t
12
 
13
#define g_sem_init(s,value) internal_sem_init(s,value)
14
#define g_sem_wait(s)       internal_sem_wait(s)
15
#define g_sem_signal(s)     internal_sem_post(s)
16
 
17
#else
18
 
19
#define g_sem_t int
20
 
21
#define g_sem_init(s,value)
22
#define g_sem_wait(s)
23
#define g_sem_signal(s)
24
 
25
#endif
26
 
27
extern g_sem_t grxsem;
28
 
29
#define grxlock()   g_sem_wait(&grxsem)
30
#define grxunlock() g_sem_signal(&grxsem)
31
 
32
#endif