diff options
author | Ian Lynagh <igloo@earth.li> | 2007-02-22 14:43:06 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-02-22 14:43:06 +0000 |
commit | 3f9e522bb0e53ce262f68424870e2bbc9135b70a (patch) | |
tree | 8207588549524b4d1a9ad65169ec1cc4fae1fea3 /rts/win32 | |
parent | 64496ad6ff9164151381d11d223294bde1859211 (diff) | |
download | haskell-3f9e522bb0e53ce262f68424870e2bbc9135b70a.tar.gz |
Free thread local storage on shutdown
Diffstat (limited to 'rts/win32')
-rw-r--r-- | rts/win32/OSThreads.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index 6f3629be4b..24fbabeaad 100644 --- a/rts/win32/OSThreads.c +++ b/rts/win32/OSThreads.c @@ -197,6 +197,17 @@ setThreadLocalVar (ThreadLocalKey *key, void *value) } } +void +freeThreadLocalKey (ThreadLocalKey *key) +{ + BOOL r; + r = TlsFree(*key); + if (r == 0) { + DWORD dw = GetLastError(); + barf("freeThreadLocalKey failed: %lu", dw); + } +} + static unsigned __stdcall forkOS_createThreadWrapper ( void * entry ) |