summaryrefslogtreecommitdiff
path: root/rts/posix
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/posix
parent64496ad6ff9164151381d11d223294bde1859211 (diff)
downloadhaskell-3f9e522bb0e53ce262f68424870e2bbc9135b70a.tar.gz
Free thread local storage on shutdown
Diffstat (limited to 'rts/posix')
-rw-r--r--rts/posix/OSThreads.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
index 7aaa76a7fc..6b6fa5cf6d 100644
--- a/rts/posix/OSThreads.c
+++ b/rts/posix/OSThreads.c
@@ -148,6 +148,15 @@ setThreadLocalVar (ThreadLocalKey *key, void *value)
}
}
+void
+freeThreadLocalKey (ThreadLocalKey *key)
+{
+ int r;
+ if ((r = pthread_key_delete(key)) != 0) {
+ barf("freeThreadLocalKey: %s", strerror(r));
+ }
+}
+
static void *
forkOS_createThreadWrapper ( void * entry )
{