summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/Schedule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 8afcf54ca0..ba4e066ae5 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2337,7 +2337,8 @@ setNumCapabilities (uint32_t new_n_capabilities USED_IF_THREADS)
// update n_capabilities before things start running
if (new_n_capabilities > n_capabilities) {
- RELAXED_STORE(&n_capabilities, enabled_capabilities = new_n_capabilities);
+ RELAXED_STORE(&n_capabilities, new_n_capabilities);
+ RELAXED_STORE(&enabled_capabilities, new_n_capabilities);
}
// We're done: release the original Capabilities