diff options
author | George Sapountzis <[email protected]> | 2010-03-01 17:28:55 +0200 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2010-03-01 20:54:20 +0200 |
commit | d7e6e879fdfb1a4e3125237d117f68025dfa0d72 (patch) | |
tree | 239924c039e5da339db1122ccfef2a25cf711ebe | |
parent | d41ab94d35cb47effbd2582289298be4f13c50e4 (diff) |
glapi: drop SOLARIS_THREADS
It seems that SOLARIS_THREADS is not used and does not work.
-rw-r--r-- | docs/dispatch.html | 2 | ||||
-rw-r--r-- | src/mesa/glapi/gen/gl_x86-64_asm.py | 2 | ||||
-rw-r--r-- | src/mesa/glapi/gen/gl_x86_asm.py | 2 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.c | 68 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.h | 35 | ||||
-rw-r--r-- | src/mesa/x86-64/glapi_x86-64.S | 2 | ||||
-rw-r--r-- | src/mesa/x86/glapi_x86.S | 2 |
7 files changed, 7 insertions, 106 deletions
diff --git a/docs/dispatch.html b/docs/dispatch.html index 0c54a84675e..e5587c1a294 100644 --- a/docs/dispatch.html +++ b/docs/dispatch.html @@ -199,7 +199,7 @@ few preprocessor defines.</p> <li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li> <li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li> <li>If any of <tt>PTHREADS</tt>, -<tt>SOLARIS_THREADS</tt>, <tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt> +<tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt> is defined, method #2 is used.</li> <li>If none of the preceeding are defined, method #1 is used.</li> </ul> diff --git a/src/mesa/glapi/gen/gl_x86-64_asm.py b/src/mesa/glapi/gen/gl_x86-64_asm.py index 31c1a2b93a8..8ac57ab7ebb 100644 --- a/src/mesa/glapi/gen/gl_x86-64_asm.py +++ b/src/mesa/glapi/gen/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(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' print '# define THREADS' print '#endif' print '' diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py index d210f3a2481..a48724ee615 100644 --- a/src/mesa/glapi/gen/gl_x86_asm.py +++ b/src/mesa/glapi/gen/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(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || 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 15401d730e0..17b6bb2b6a7 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -116,74 +116,6 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) /* - * Solaris/Unix International Threads -- Use only if POSIX threads - * aren't available on your Unix platform. Solaris 2.[34] are examples - * of platforms where this is the case. Be sure to use -mt and/or - * -D_REENTRANT when compiling. - */ -#ifdef SOLARIS_THREADS -#define USE_LOCK_FOR_KEY /* undef this to try a version without - lock for the global key... */ - -PUBLIC unsigned long -_glthread_GetID(void) -{ - abort(); /* XXX not implemented yet */ - return (unsigned long) 0; -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 || - (errno = thr_keycreate(&(tsd->key), free)) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void* ret; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } -#ifdef USE_LOCK_FOR_KEY - mutex_lock(&tsd->keylock); - thr_getspecific(tsd->key, &ret); - mutex_unlock(&tsd->keylock); -#else - if ((errno = thr_getspecific(tsd->key, &ret)) != 0) { - perror(GET_TSD_ERROR); - exit(-1); - } -#endif - return ret; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if ((errno = thr_setspecific(tsd->key, ptr)) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#undef USE_LOCK_FOR_KEY -#endif /* SOLARIS_THREADS */ - - - -/* * Win32 Threads. The only available option for Windows 95/NT. * Be sure that you compile using the Multithreaded runtime, otherwise * bad things will happen. diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index 389c24204b5..e5193aaf98d 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -64,7 +64,7 @@ #define GLTHREAD_H -#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) #ifndef THREADS #define THREADS #endif @@ -149,38 +149,7 @@ typedef unsigned int _glthread_Cond; #define _glthread_COND_BROADCAST(cond) \ ASSERT(0); -#endif - - -/* - * Solaris threads. Use only up to Solaris 2.4. - * Solaris 2.5 and higher provide POSIX threads. - * 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 */ - - +#endif /* PTHREADS */ /* diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S index 4c9eab882b5..bd5a657e195 100644 --- a/src/mesa/x86-64/glapi_x86-64.S +++ b/src/mesa/x86-64/glapi_x86-64.S @@ -45,7 +45,7 @@ # define GL_PREFIX(n) GLNAME(CONCAT(gl,n)) # endif -#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) # define THREADS #endif diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index 13270ef35d8..ae5dd2b0d17 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -52,7 +52,7 @@ #define GLOBL_FN(x) GLOBL x #endif -#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) # define THREADS #endif |