Kernel/Mutex: Implemented priority inheritance.

The implementation is based on reverse engineering of the 3DS's kernel.

A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes.
When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes.
This commit is contained in:
Subv 2017-01-01 16:59:30 -05:00
parent e6a7723f2f
commit 7abf185390
5 changed files with 51 additions and 31 deletions

View file

@ -145,7 +145,7 @@ public:
* Add a thread to wait on this object
* @param thread Pointer to thread to add
*/
void AddWaitingThread(SharedPtr<Thread> thread);
virtual void AddWaitingThread(SharedPtr<Thread> thread);
/**
* Removes a thread from waiting on this object (e.g. if it was resumed already)