Commit 8846139a authored by Simon Marlow's avatar Simon Marlow
Browse files

performGC_(): don't use the existing Task, always grab a new one

parent 7a1f8fbd
......@@ -3016,17 +3016,15 @@ static void (*extra_roots)(evac_fn);
static void
performGC_(rtsBool force_major, void (*get_roots)(evac_fn))
{
Task *task = myTask();
if (task == NULL) {
ACQUIRE_LOCK(&sched_mutex);
task = newBoundTask();
RELEASE_LOCK(&sched_mutex);
scheduleDoGC(NULL,task,force_major, get_roots);
boundTaskExiting(task);
} else {
scheduleDoGC(NULL,task,force_major, get_roots);
}
Task *task;
// We must grab a new Task here, because the existing Task may be
// associated with a particular Capability, and chained onto the
// suspended_ccalling_tasks queue.
ACQUIRE_LOCK(&sched_mutex);
task = newBoundTask();
RELEASE_LOCK(&sched_mutex);
scheduleDoGC(NULL,task,force_major, get_roots);
boundTaskExiting(task);
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment