Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexes

This commit is contained in:
Subv 2017-01-02 19:38:08 -05:00
parent b6a0355568
commit d3ff5b91e1
5 changed files with 60 additions and 42 deletions

View file

@ -39,6 +39,12 @@ public:
std::string name; ///< Name of mutex (optional)
SharedPtr<Thread> holding_thread; ///< Thread that has acquired the mutex
/**
* Elevate the mutex priority to the best priority
* among the priorities of all its waiting threads.
*/
void UpdatePriority();
bool ShouldWait(Thread* thread) const override;
void Acquire(Thread* thread) override;