Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexes
This commit is contained in:
parent
b6a0355568
commit
d3ff5b91e1
5 changed files with 60 additions and 42 deletions
|
@ -89,6 +89,12 @@ public:
|
|||
*/
|
||||
void SetPriority(s32 priority);
|
||||
|
||||
/**
|
||||
* Boost's a thread's priority to the best priority among the thread's held mutexes.
|
||||
* This prevents priority inversion via priority inheritance.
|
||||
*/
|
||||
void UpdatePriority();
|
||||
|
||||
/**
|
||||
* Temporarily boosts the thread's priority until the next time it is scheduled
|
||||
* @param priority The new priority
|
||||
|
@ -178,6 +184,9 @@ public:
|
|||
/// Mutexes currently held by this thread, which will be released when it exits.
|
||||
boost::container::flat_set<SharedPtr<Mutex>> held_mutexes;
|
||||
|
||||
/// Mutexes that this thread is currently waiting for.
|
||||
boost::container::flat_set<SharedPtr<Mutex>> pending_mutexes;
|
||||
|
||||
SharedPtr<Process> owner_process; ///< Process that owns this thread
|
||||
|
||||
/// Objects that the thread is waiting on.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue