Commit 24733b8f authored by AndreasVoellmy's avatar AndreasVoellmy Committed by tibbe

setNumCapabilities calls GHC.Conc.IO.ioManagerCapabilitiesChanged before returning.

This enables the IO manager to change the number of IO loops it uses (usually one per capability).
parent 38a5902f
......@@ -45,6 +45,7 @@ PRELUDE_CLOSURE(base_ControlziExceptionziBase_nestedAtomically_closure);
PRELUDE_CLOSURE(base_GHCziConcziSync_runSparks_closure);
PRELUDE_CLOSURE(base_GHCziConcziIO_ensureIOManagerIsRunning_closure);
PRELUDE_CLOSURE(base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure);
PRELUDE_CLOSURE(base_GHCziConcziSignal_runHandlers_closure);
PRELUDE_CLOSURE(base_GHCziTopHandler_flushStdHandles_closure);
......
......@@ -2067,6 +2067,14 @@ setNumCapabilities (nat new_n_capabilities USED_IF_THREADS)
stgFree(old_capabilities);
}
// Notify IO manager that the number of capabilities has changed.
rts_evalIO(
&cap,
rts_apply(cap,
&base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure,
rts_mkInt(cap, enabled_capabilities)),
NULL);
rts_unlock(cap);
#endif // THREADED_RTS
......
......@@ -101,6 +101,7 @@ ld-options:
, "-u", "_base_GHCziTopHandler_runIO_closure"
, "-u", "_base_GHCziTopHandler_runNonIO_closure"
, "-u", "_base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
, "-u", "_base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
, "-u", "_base_GHCziConcziSync_runSparks_closure"
, "-u", "_base_GHCziConcziSignal_runHandlers_closure"
#else
......
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