diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 13:32:59 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 13:32:59 +0000 |
commit | bf781c5ff285301ad70ffc5f4321b8906f71edd8 (patch) | |
tree | 3b770f4bf9a8cd11dd9f14e7f758991a73a52d78 /xserver/glx/glthread.h | |
parent | e59d0622d3162f7b5a7420ef87dbebb200348c37 (diff) |
Update to xserver 1.11.2
Diffstat (limited to 'xserver/glx/glthread.h')
-rw-r--r-- | xserver/glx/glthread.h | 72 |
1 files changed, 2 insertions, 70 deletions
diff --git a/xserver/glx/glthread.h b/xserver/glx/glthread.h index e2765cebb..532401a73 100644 --- a/xserver/glx/glthread.h +++ b/xserver/glx/glthread.h @@ -68,10 +68,7 @@ #define _glapi_Dispatch _mglapi_Dispatch #endif - - -#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\ - defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \ +#if (defined(PTHREADS) || defined(WIN32_THREADS)) \ && !defined(THREADS) # define THREADS #endif @@ -127,27 +124,6 @@ typedef pthread_mutex_t _glthread_Mutex; * Be sure to compile with -mt on the Solaris compilers, or * use -D_REENTRANT if using gcc. */ -#ifdef SOLARIS_THREADS -#include <thread.h> - -typedef struct { - thread_key_t key; - mutex_t keylock; - int initMagic; -} _glthread_TSD; - -typedef thread_t _glthread_Thread; - -typedef mutex_t _glthread_Mutex; - -/* XXX need to really implement mutex-related macros */ -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 -#define _glthread_INIT_MUTEX(name) (void) name -#define _glthread_DESTROY_MUTEX(name) (void) name -#define _glthread_LOCK_MUTEX(name) (void) name -#define _glthread_UNLOCK_MUTEX(name) (void) name - -#endif /* SOLARIS_THREADS */ @@ -177,49 +153,6 @@ typedef CRITICAL_SECTION _glthread_Mutex; #endif /* WIN32_THREADS */ - - - -/* - * XFree86 has its own thread wrapper, Xthreads.h - * We wrap it again for GL. - */ -#ifdef USE_XTHREADS -#include <X11/Xthreads.h> - -typedef struct { - xthread_key_t key; - int initMagic; -} _glthread_TSD; - -typedef xthread_t _glthread_Thread; - -typedef xmutex_rec _glthread_Mutex; - -#ifdef XMUTEX_INITIALIZER -#define _glthread_DECLARE_STATIC_MUTEX(name) \ - static _glthread_Mutex name = XMUTEX_INITIALIZER -#else -#define _glthread_DECLARE_STATIC_MUTEX(name) \ - static _glthread_Mutex name -#endif - -#define _glthread_INIT_MUTEX(name) \ - xmutex_init(&(name)) - -#define _glthread_DESTROY_MUTEX(name) \ - xmutex_clear(&(name)) - -#define _glthread_LOCK_MUTEX(name) \ - (void) xmutex_lock(&(name)) - -#define _glthread_UNLOCK_MUTEX(name) \ - (void) xmutex_unlock(&(name)) - -#endif /* USE_XTHREADS */ - - - /* * BeOS threads. R5.x required. */ @@ -300,8 +233,7 @@ _glthread_SetTSD(_glthread_TSD *, void *); #if defined(GLX_USE_TLS) -extern __thread struct _glapi_table * _glapi_tls_Dispatch - __attribute__((tls_model("initial-exec"))); +extern TLS struct _glapi_table * _glapi_tls_Dispatch; #define GET_DISPATCH() _glapi_tls_Dispatch |