mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 21:05:06 +01:00
Log and flush inside KProcess::Kill
We want to know when the `KProcess` is being killed and flushing log during it is important since it can often result in hangs due to joining not working correctly.
This commit is contained in:
parent
597a6ff31d
commit
c874907eb5
@ -26,6 +26,9 @@ namespace skyline::kernel::type {
|
||||
}
|
||||
|
||||
void KProcess::Kill(bool join, bool all, bool disableCreation) {
|
||||
Logger::Warn("Killing {}{}KProcess{}", join ? "and joining " : "", all ? "all threads in " : "HOS-0 in ", disableCreation ? " with new thread creation disabled" : "");
|
||||
Logger::EmulationContext.Flush();
|
||||
|
||||
bool expected{false};
|
||||
if (!join && !alreadyKilled.compare_exchange_strong(expected, true))
|
||||
// If the process has already been killed and we don't want to wait for it to join then just instantly return rather than waiting on the mutex
|
||||
|
Loading…
Reference in New Issue
Block a user