summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglglobals.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-07-17 11:41:02 -0600
committerBrian Paul <[email protected]>2009-07-17 11:41:02 -0600
commit75da80b29556e6dbbba21e5297ca440e475f65cb (patch)
tree8ae922d896d77df1e70768edaace6e12462d9bc4 /src/egl/main/eglglobals.h
parent8e92ec9fdd58bdfcdef65a995988974d3266b9ad (diff)
egl: Support per-thread info.
This commit introduces a "current" system to manage per-thread info. It uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined. If none of them are defined, it uses a dummy implementation that is just like before. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/eglglobals.h')
-rw-r--r--src/egl/main/eglglobals.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h
index 14d8ea487af..fbb55c23f00 100644
--- a/src/egl/main/eglglobals.h
+++ b/src/egl/main/eglglobals.h
@@ -3,17 +3,7 @@
#include "egltypedefs.h"
#include "eglhash.h"
-
-
-/**
- * Per-thread info
- */
-struct _egl_thread_info
-{
- EGLint LastError;
- _EGLContext *CurrentContext;
- EGLenum CurrentAPI;
-};
+#include "eglcurrent.h"
/**
@@ -33,9 +23,6 @@ struct _egl_global
char ClientAPIs[1000]; /**< updated by eglQueryString */
- /* XXX temporary - should be thread-specific data (TSD) */
- _EGLThreadInfo *ThreadInfo;
-
EGLint NumDrivers;
_EGLDriver *Drivers[10];
};
@@ -52,20 +39,4 @@ extern void
_eglDestroyGlobals(void);
-extern _EGLThreadInfo *
-_eglNewThreadInfo(void);
-
-
-extern void
-_eglDeleteThreadData(_EGLThreadInfo *t);
-
-
-extern _EGLThreadInfo *
-_eglGetCurrentThread(void);
-
-
-extern void
-_eglError(EGLint errCode, const char *msg);
-
-
#endif /* EGLGLOBALS_INCLUDED */