citra-shitamoto-network/src/core/hle/kernel
Yuri Kunde Schlesner 52f58e64ef Kernel: Make WaitObjects share ownership of Threads waiting on them
During normal operation, a thread waiting on an WaitObject and the
object hold mutual references to each other for the duration of the
wait.

If a process is forcefully terminated (The CTR kernel has a SVC to do
this, TerminateProcess, though no equivalent exists for threads.) its
threads would also be stopped and destroyed, leaving dangling pointers
in the WaitObjects.

The solution is to simply have the Thread remove itself from WaitObjects
when it is stopped. The vector of Threads in WaitObject has also been
changed to hold SharedPtrs, just in case. (Better to have a reference
cycle than a crash.)
2015-02-02 15:37:08 -02:00
..
address_arbiter.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
address_arbiter.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
event.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
event.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
kernel.cpp Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
kernel.h Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
mutex.cpp Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
mutex.h Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
semaphore.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
semaphore.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
session.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
session.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
shared_memory.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
shared_memory.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
thread.cpp Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
thread.h Kernel: Make WaitObjects share ownership of Threads waiting on them 2015-02-02 15:37:08 -02:00
timer.cpp Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00
timer.h Explicitly instantiate constructors/destructors for Kernel objects 2015-02-02 15:37:07 -02:00