RTS tidyup sweep, first phase
[ghc-hetmet.git] / rts / ThreadLabels.c
index 1c89d84..aa620f0 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "PosixSource.h"
 #include "Rts.h"
+
 #include "ThreadLabels.h"
 #include "RtsUtils.h"
 #include "Hash.h"
@@ -29,6 +30,15 @@ initThreadLabelTable(void)
 }
 
 void
+freeThreadLabelTable(void)
+{
+    if (threadLabels != NULL) {
+        freeHashTable(threadLabels, NULL);
+        threadLabels = NULL;
+    }
+}
+
+void
 updateThreadLabel(StgWord key, void *data)
 {
   removeThreadLabel(key);