summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-01-03 01:38:08 +0100
committerSubv <subv2112@gmail.com>2017-01-04 21:58:48 +0100
commitd3ff5b91e14356912589f9bac47fccbe79e07279 (patch)
treee35c698d40539e360981a61b38f8fbb60aee7418 /src/core/hle/kernel/thread.h
parentKernel/Mutex: Update a mutex priority when a thread stops waiting on it. (diff)
downloadyuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.gz
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.bz2
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.lz
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.xz
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.zst
yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/thread.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index f2bc1ec9c..e2f0cc831 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -90,6 +90,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.