balance Genode CPU pinning, deadlock at Genode exit (#6317)
* Genode: balance thread CPU affinities Genode threads are pinned by defaut to the same CPU as the initial component entrypoint thread. Thread affinities are also permanent. This patch pins new threads to CPUs in a round-robin manner. Arbitrary CPU pinning is not exposed and the 'nimPinToCpu' has no effect. * Genode: guarantee that 'quit' will not return On Genode exits are handled by whatever component is acting as parent. The caller has no guarentee that the parent implementation will halt the caller's threads, so explicitly deadlock the 'quit' procedure.
This commit is contained in:
parent
248caaf27e
commit
9258672cee
3 changed files with 17 additions and 7 deletions
|
|
@ -1435,7 +1435,8 @@ when defined(nimdoc):
|
|||
|
||||
elif defined(genode):
|
||||
proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn,
|
||||
importcpp: "genodeEnv->parent().exit(@)", header: "<base/env.h>".}
|
||||
importcpp: "genodeEnv->parent().exit(@); Genode::sleep_forever()",
|
||||
header: "<base/sleep.h>".}
|
||||
|
||||
else:
|
||||
proc quit*(errorcode: int = QuitSuccess) {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue