diff options
author | Brian Paul <[email protected]> | 2009-02-09 09:22:22 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-09 09:22:22 -0700 |
commit | e97681c7f551a2a2a6bd5eff0f4192a870c816c0 (patch) | |
tree | dff2bf0e6d22efb92af131f64be0621ed316977c /src/mesa/glapi/glthread.h | |
parent | 1a46c8a062aea59de5cf55881104489db5d609e5 (diff) | |
parent | b907d4cd8fafe719b4f87d877562829548937485 (diff) |
mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Conflicts:
Makefile
docs/relnotes-7.4.html
docs/relnotes.html
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/main/imports.c
src/mesa/main/mtypes.h
src/mesa/main/texcompress.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'src/mesa/glapi/glthread.h')
-rw-r--r-- | src/mesa/glapi/glthread.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index 27ccd2e2e7b..ae2f79f37dd 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -116,9 +116,49 @@ typedef pthread_mutex_t _glthread_Mutex; #define _glthread_UNLOCK_MUTEX(name) \ (void) pthread_mutex_unlock(&(name)) -#endif /* PTHREADS */ +typedef pthread_cond_t _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ + static _glthread_Cond name = PTHREAD_COND_INITIALIZER +#define _glthread_INIT_COND(cond) \ + pthread_cond_init(&(cond), NULL) + +#define _glthread_DESTROY_COND(name) \ + pthread_cond_destroy(&(name)) + +#define _glthread_COND_WAIT(cond, mutex) \ + pthread_cond_wait(&(cond), &(mutex)) + +#define _glthread_COND_SIGNAL(cond) \ + pthread_cond_signal(&(cond)) + +#define _glthread_COND_BROADCAST(cond) \ + pthread_cond_broadcast(&(cond)) + + +#else /* PTHREADS */ + +typedef unsigned int _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ +// #warning Condition variables not implemented. + +#define _glthread_INIT_COND(cond) \ + ASSERT(0); + +#define _glthread_DESTROY_COND(name) \ + ASSERT(0); + +#define _glthread_COND_WAIT(cond, mutex) \ + ASSERT(0); + +#define _glthread_COND_SIGNAL(cond) \ + ASSERT(0); + +#define _glthread_COND_BROADCAST(cond) \ + ASSERT(0); + +#endif /* @@ -259,11 +299,11 @@ typedef benaphore _glthread_Mutex; * THREADS not defined */ -typedef int _glthread_TSD; +typedef GLuint _glthread_TSD; -typedef int _glthread_Thread; +typedef GLuint _glthread_Thread; -typedef int _glthread_Mutex; +typedef GLuint _glthread_Mutex; #define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 |