mesa/src/mapi/glapi/glthread.h
Chia-I Wu a73c6540d9 mapi: Add mapi and share the code with glapi.
Specifically, move all or most of

      glapi/glapi.c         to mapi/u_current.c,
      glapi/glapi_execmem.c to mapi/u_execmem.c,
      glapi/glthread.[ch]   to mapi/u_thread.[ch]

and remove their dependencies on core Mesa headers.
2010-05-07 10:41:11 +08:00

23 lines
796 B
C

#ifndef GLTHREAD_H
#define GLTHREAD_H
#include "mapi/u_thread.h"
#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name)
#define _glthread_INIT_MUTEX(name) u_mutex_init(name)
#define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name)
#define _glthread_LOCK_MUTEX(name) u_mutex_lock(name)
#define _glthread_UNLOCK_MUTEX(name) u_mutex_unlock(name)
#define _glthread_InitTSD(tsd) u_tsd_init(tsd);
#define _glthread_DestroyTSD(tsd) u_tsd_destroy(tsd);
#define _glthread_GetTSD(tsd) u_tsd_get(tsd);
#define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr);
typedef struct u_tsd _glthread_TSD;
typedef u_mutex _glthread_Mutex;
PUBLIC unsigned long
_glthread_GetID(void);
#endif /* THREADS_H */