diff options
Diffstat (limited to 'src/mesa/glapi/glthread.c')
-rw-r--r-- | src/mesa/glapi/glthread.c | 59 |
1 files changed, 3 insertions, 56 deletions
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index b818f4e26e..dc90b3602c 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -25,17 +25,15 @@ /* * XXX There's probably some work to do in order to make this file - * truly reusable outside of Mesa. + * truly reusable outside of Mesa. First, the glheader.h include must go. */ - #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <stdlib.h> -#include <stdio.h> -#include "glthread.h" +#include "main/compiler.h" +#include "glapi/glthread.h" /* @@ -248,57 +246,6 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) #endif /* WIN32_THREADS */ - - -/* - * XFree86 has its own thread wrapper, Xthreads.h - * We wrap it again for GL. - */ -#ifdef USE_XTHREADS - -unsigned long -_glthread_GetID(void) -{ - return (unsigned long) xthread_self(); -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if (xthread_key_create(&tsd->key, NULL) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void *ptr; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_get_specific(tsd->key, &ptr); - return ptr; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_set_specific(tsd->key, ptr); -} - -#endif /* XTHREAD */ - - - /* * BeOS threads */ |