X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FThreadLabels.c;h=aa620f0b9e2d14954435e875c7cd787742295942;hp=72cd5d3c4b073e04748618f20b7a9b9f36a7dc24;hb=a2a67cd520b9841114d69a87a423dabcb3b4368e;hpb=b1953bbb1ed3cb16497e5447db7487f0c2d9e41a diff --git a/rts/ThreadLabels.c b/rts/ThreadLabels.c index 72cd5d3..aa620f0 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, NULL); + threadLabels = NULL; + } +} + +void updateThreadLabel(StgWord key, void *data) { removeThreadLabel(key);