diff options
Diffstat (limited to 'rts/Stats.c')
-rw-r--r-- | rts/Stats.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Stats.c b/rts/Stats.c index 80fca509ad..fcf48c3720 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -1230,6 +1230,8 @@ stat_exit (void) { RTSSummaryStats sum; init_RTSSummaryStats(&sum); + // We'll need to refer to task counters later + ACQUIRE_LOCK(&all_tasks_mutex); if (RtsFlags.GcFlags.giveStats != NO_GC_STATS) { // First we tidy the times in stats, and populate the times in sum. @@ -1446,6 +1448,8 @@ stat_exit (void) stgFree(GC_coll_max_pause); GC_coll_max_pause = NULL; } + + RELEASE_LOCK(&all_tasks_mutex); } /* Note [Work Balance] |