diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxclient.h | 18 | ||||
-rw-r--r-- | src/glx/glxcurrent.c | 11 | ||||
-rw-r--r-- | src/glx/tests/fake_glx_screen.cpp | 2 |
3 files changed, 2 insertions, 29 deletions
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 122ae5dd1b7..2776b44a9e5 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -48,12 +48,10 @@ #include <stdlib.h> #include <stdio.h> #include <stdint.h> +#include <pthread.h> #include "GL/glxproto.h" #include "glxconfig.h" #include "glxhash.h" -#if defined( HAVE_PTHREAD ) -# include <pthread.h> -#endif #include "util/macros.h" #include "glxextensions.h" @@ -629,7 +627,6 @@ extern void __glXPreferEGL(int state); extern int __glXDebug; /* This is per-thread storage in an MT environment */ -#if defined( HAVE_PTHREAD ) extern void __glXSetCurrentContext(struct glx_context * c); @@ -646,14 +643,6 @@ extern struct glx_context *__glXGetCurrentContext(void); # endif /* defined( GLX_USE_TLS ) */ -#else - -extern struct glx_context *__glXcurrentContext; -#define __glXGetCurrentContext() __glXcurrentContext -#define __glXSetCurrentContext(gc) __glXcurrentContext = gc - -#endif /* defined( HAVE_PTHREAD ) */ - extern void __glXSetCurrentContextNull(void); @@ -661,14 +650,9 @@ extern void __glXSetCurrentContextNull(void); ** Global lock for all threads in this address space using the GLX ** extension */ -#if defined( HAVE_PTHREAD ) extern pthread_mutex_t __glXmutex; #define __glXLock() pthread_mutex_lock(&__glXmutex) #define __glXUnlock() pthread_mutex_unlock(&__glXmutex) -#else -#define __glXLock() -#define __glXUnlock() -#endif /* ** Setup for a command. Initialize the extension for dpy if necessary. diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c index 86fb658ca5e..7f47a427771 100644 --- a/src/glx/glxcurrent.c +++ b/src/glx/glxcurrent.c @@ -33,9 +33,7 @@ * Client-side GLX interface for current context management. */ -#ifdef HAVE_PTHREAD #include <pthread.h> -#endif #include "glxclient.h" @@ -67,8 +65,6 @@ struct glx_context dummyContext = { * Current context management and locking */ -#if defined( HAVE_PTHREAD ) - _X_HIDDEN pthread_mutex_t __glXmutex = PTHREAD_MUTEX_INITIALIZER; # if defined( GLX_USE_TLS ) @@ -138,13 +134,6 @@ __glXGetCurrentContext(void) # endif /* defined( GLX_USE_TLS ) */ -#else - -/* not thread safe */ -_X_HIDDEN struct glx_context *__glXcurrentContext = &dummyContext; - -#endif - _X_HIDDEN void __glXSetCurrentContextNull(void) diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp index ccb1afae47d..db20749505c 100644 --- a/src/glx/tests/fake_glx_screen.cpp +++ b/src/glx/tests/fake_glx_screen.cpp @@ -77,7 +77,7 @@ indirect_create_context_attribs(struct glx_screen *base, __thread void *__glX_tls_Context = NULL; -#if defined(HAVE_PTHREAD) && !defined(GLX_USE_TLS) +#if !defined(GLX_USE_TLS) extern "C" struct glx_context * __glXGetCurrentContext() { |