1 #ifndef EGLMUTEX_INCLUDED
2 #define EGLMUTEX_INCLUDED
4 #include "eglcompiler.h"
9 typedef pthread_mutex_t _EGLMutex
;
11 static INLINE
void _eglInitMutex(_EGLMutex
*m
)
13 pthread_mutex_init(m
, NULL
);
17 _eglDestroyMutex(_EGLMutex
*m
)
19 pthread_mutex_destroy(m
);
23 _eglLockMutex(_EGLMutex
*m
)
25 pthread_mutex_lock(m
);
29 _eglUnlockMutex(_EGLMutex
*m
)
31 pthread_mutex_unlock(m
);
34 #define _EGL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
35 #define _EGL_DECLARE_MUTEX(m) \
36 _EGLMutex m = _EGL_MUTEX_INITIALIZER
40 typedef int _EGLMutex
;
41 static INLINE
void _eglInitMutex(_EGLMutex
*m
) { (void) m
; }
42 static INLINE
void _eglDestroyMutex(_EGLMutex
*m
) { (void) m
; }
43 static INLINE
void _eglLockMutex(_EGLMutex
*m
) { (void) m
; }
44 static INLINE
void _eglUnlockMutex(_EGLMutex
*m
) { (void) m
; }
46 #define _EGL_MUTEX_INITIALIZER 0
47 #define _EGL_DECLARE_MUTEX(m) \
48 _EGLMutex m = _EGL_MUTEX_INITIALIZER
52 #endif /* EGLMUTEX_INCLUDED */