X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreadLabels.c;h=6d2a5d641d05273d9469ee40fba2890c82f967e8;hb=d8334d807812e40f67770ffc37608c0ce66f96b2;hp=72cd5d3c4b073e04748618f20b7a9b9f36a7dc24;hpb=b1953bbb1ed3cb16497e5447db7487f0c2d9e41a;p=ghc-hetmet.git diff --git a/rts/ThreadLabels.c b/rts/ThreadLabels.c index 72cd5d3..6d2a5d6 100644 --- a/rts/ThreadLabels.c +++ b/rts/ThreadLabels.c @@ -9,11 +9,13 @@ #include "PosixSource.h" #include "Rts.h" + #include "ThreadLabels.h" #include "RtsUtils.h" #include "Hash.h" #include +#include #if defined(DEBUG) /* to the end */ @@ -28,6 +30,15 @@ initThreadLabelTable(void) } void +freeThreadLabelTable(void) +{ + if (threadLabels != NULL) { + freeHashTable(threadLabels, stgFree); + threadLabels = NULL; + } +} + +static void updateThreadLabel(StgWord key, void *data) { removeThreadLabel(key);