From 75da80b29556e6dbbba21e5297ca440e475f65cb Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 17 Jul 2009 11:41:02 -0600 Subject: 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 --- src/egl/main/eglglobals.h | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'src/egl/main/eglglobals.h') diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h index 14d8ea487a..fbb55c23f0 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 */ -- cgit v1.2.3