diff --git a/rts/Profiling.c b/rts/Profiling.c index 2cf4a97ea6a562bbd08d0c3e68f3c776fa703b21..b039facfbf60d86145e53805ac21e1f49c3a3696 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -204,6 +204,7 @@ void initProfiling (void) // void refreshProfilingCCSs (void) { + ACQUIRE_LOCK(&ccs_mutex); // make CCS_MAIN the parent of all the pre-defined CCSs. CostCentreStack *next; for (CostCentreStack *ccs = CCS_LIST; ccs != NULL; ) { @@ -214,6 +215,7 @@ void refreshProfilingCCSs (void) ccs = next; } CCS_LIST = NULL; + RELEASE_LOCK(&ccs_mutex); } void