diff options
author | RALOVICH, Kristóf <tade60@freemail.hu> | 2009-07-23 17:56:52 +0200 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-07-27 15:38:04 -0600 |
commit | 8f397bffa840d9a14ee2e089728119b65d88bb38 (patch) | |
tree | ecb6d518d2552c5d8b65d718613776d1fd7a113e /src/mesa/glapi | |
parent | 3ccf89d58479d48b8643b1c67c4b9c34b6b97e4a (diff) |
glapi: remove XTHREADS support
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/gl_x86-64_asm.py | 2 | ||||
-rw-r--r-- | src/mesa/glapi/gl_x86_asm.py | 2 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.c | 51 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.h | 44 |
4 files changed, 3 insertions, 96 deletions
diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py index fa45406f47..f36ad3a5d8 100644 --- a/src/mesa/glapi/gl_x86-64_asm.py +++ b/src/mesa/glapi/gl_x86-64_asm.py @@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))' print '# endif' print '' - print '#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' print '# define THREADS' print '#endif' print '' diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index 0dbf3ebe0a..36f0e31fe2 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -79,7 +79,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '#define GLOBL_FN(x) GLOBL x' print '#endif' print '' - print '#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' print '# define THREADS' print '#endif' print '' diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index e3abb0f4ae..737fd4d6a8 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -246,57 +246,6 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) #endif /* WIN32_THREADS */ - - -/* - * XFree86 has its own thread wrapper, Xthreads.h - * We wrap it again for GL. - */ -#ifdef USE_XTHREADS - -unsigned long -_glthread_GetID(void) -{ - return (unsigned long) xthread_self(); -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if (xthread_key_create(&tsd->key, NULL) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void *ptr; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_get_specific(tsd->key, &ptr); - return ptr; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_set_specific(tsd->key, ptr); -} - -#endif /* XTHREAD */ - - - /* * BeOS threads */ diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index dfe09a9d59..8ec933a851 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -71,7 +71,7 @@ #if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\ - defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \ + defined(WIN32_THREADS) || defined(BEOS_THREADS)) \ && !defined(THREADS) # define THREADS #endif @@ -218,48 +218,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. */ |