summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glthread.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-04-14 21:05:55 +0000
committerIan Romanick <idr@us.ibm.com>2005-04-14 21:05:55 +0000
commit6cae4f3bc9b92f9bbda753843e8ff0f0bbbb8fb3 (patch)
tree20046e523ff4bf96981adb3b6dba8f17cac00840 /src/mesa/glapi/glthread.h
parentf434e07a6ac849cd127d70eee8b3349da7cfb360 (diff)
In GLX_USE_TLS builds, make GET_CURRENT_CONTEXT use the TLS verion of the
variable. Without this, GET_CURRENT_CONTEXT would *always* result in a call to _glapi_get_context (because _glapi_Context is a const pointer to NULL in TLS builds).
Diffstat (limited to 'src/mesa/glapi/glthread.h')
-rw-r--r--src/mesa/glapi/glthread.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 615d169986..291485dc20 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -64,9 +64,10 @@
#define GLTHREAD_H
-#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
- defined(XTHREADS) || defined(BEOS_THREADS)
-#define THREADS
+#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
+ defined(WIN32_THREADS) || defined(XTHREADS) || defined(BEOS_THREADS)) \
+ && !defined(THREADS)
+# define THREADS
#endif
#ifdef VMS