1 #ifndef GLTHREAD_H 2 #define GLTHREAD_H 3 4 #include "mapi/u_thread.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 #define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name) 11 #define _glthread_INIT_MUTEX(name) u_mutex_init(name) 12 #define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name) 13 #define _glthread_LOCK_MUTEX(name) u_mutex_lock(name) 14 #define _glthread_UNLOCK_MUTEX(name) u_mutex_unlock(name) 15 16 #define _glthread_InitTSD(tsd) u_tsd_init(tsd); 17 #define _glthread_DestroyTSD(tsd) u_tsd_destroy(tsd); 18 #define _glthread_GetTSD(tsd) u_tsd_get(tsd); 19 #define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr); 20 21 typedef struct u_tsd _glthread_TSD; 22 typedef u_mutex _glthread_Mutex; 23 24 #ifdef __cplusplus 25 } 26 #endif 27 28 #endif /* GLTHREAD_H */ 29