summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glthread.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-03-01 04:44:02 +0200
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-03-01 20:54:20 +0200
commitd41ab94d35cb47effbd2582289298be4f13c50e4 (patch)
tree01210f712026af2a1daf5cf502df33b2b154f440 /src/mesa/glapi/glthread.c
parent7b454b00a4423937bd83ecff2d61ff08e6504707 (diff)
glapi.c: misc coscmetic for FreeTSD
- move out of of the dispatch/context block to after corresponding init functions - use more consistent naming with corresponding init functions - XXX use _glthread_InitTSD() vs (void)_glthread_GetTSD() in _glapi_check_multithread() XXX
Diffstat (limited to 'src/mesa/glapi/glthread.c')
-rw-r--r--src/mesa/glapi/glthread.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index be4e2f754d..15401d730e 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -190,17 +190,9 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
*/
#ifdef WIN32_THREADS
-void FreeTSD(_glthread_TSD *p)
+static void InsteadOf_exit(int nCode)
{
- if (p->initMagic==INIT_MAGIC) {
- TlsFree(p->key);
- p->initMagic=0;
- }
-}
-
-void InsteadOf_exit(int nCode)
-{
- DWORD dwErr=GetLastError();
+ DWORD dwErr = GetLastError();
}
PUBLIC unsigned long
@@ -222,6 +214,17 @@ _glthread_InitTSD(_glthread_TSD *tsd)
}
+void
+_glthread_DestroyTSD(_glthread_TSD *tsd)
+{
+ if (tsd->initMagic != INIT_MAGIC) {
+ return;
+ }
+ TlsFree(tsd->key);
+ tsd->initMagic = 0x0;
+}
+
+
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{