Commit c95f5364 authored by Dylan Yudaken's avatar Dylan Yudaken

Let hs_try_putmvar pick the current running cap when none is specified

parent cc3394e4
......@@ -685,12 +685,16 @@ void hs_try_putmvar (/* in */ int capability,
Capability *task_old_cap USED_IF_THREADS;
if (capability < 0) {
capability = task->preferred_capability;
if (capability < 0) {
capability = 0;
if (task->preferred_capability >= 0) {
cap = capabilities[task->preferred_capability % enabled_capabilities];
} else if (task->cap != NULL) {
cap = task->cap;
} else {
cap = capabilities[0];
}
} else {
cap = capabilities[capability % enabled_capabilities];
}
cap = capabilities[capability % enabled_capabilities];
#if !defined(THREADED_RTS)
......
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