summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-02-22 14:43:06 +0000
committerIan Lynagh <igloo@earth.li>2007-02-22 14:43:06 +0000
commit3f9e522bb0e53ce262f68424870e2bbc9135b70a (patch)
tree8207588549524b4d1a9ad65169ec1cc4fae1fea3 /rts/win32
parent64496ad6ff9164151381d11d223294bde1859211 (diff)
downloadhaskell-3f9e522bb0e53ce262f68424870e2bbc9135b70a.tar.gz
Free thread local storage on shutdown
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/OSThreads.c11
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 )