Mesa (master): glapi: remove XTHREADS support

Brian Paul brianp at kemper.freedesktop.org
Mon Jul 27 21:42:24 UTC 2009


Module: Mesa
Branch: master
Commit: 8f397bffa840d9a14ee2e089728119b65d88bb38
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f397bffa840d9a14ee2e089728119b65d88bb38

Author: RALOVICH, Kristóf <tade60 at freemail.hu>
Date:   Thu Jul 23 17:56:52 2009 +0200

glapi: remove XTHREADS support

---

 src/mesa/glapi/gl_x86-64_asm.py |    2 +-
 src/mesa/glapi/gl_x86_asm.py    |    2 +-
 src/mesa/glapi/glthread.c       |   51 ---------------------------------------
 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 fa45406..f36ad3a 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 0dbf3eb..36f0e31 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 e3abb0f..737fd4d 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 dfe09a9..8ec933a 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.
  */




More information about the mesa-commit mailing list