diff options
Diffstat (limited to 'src/mesa/glapi/glthread.c')
-rw-r--r-- | src/mesa/glapi/glthread.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index be4e2f754d7..15401d730e0 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) { |