summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-04-21 03:15:16 +0200
committerSubv <subv2112@gmail.com>2018-04-23 18:23:44 +0200
commit46572d027dc9620ed2b2a50277e6afd2a115ab81 (patch)
tree72562a37575252e8f4c0160a3067b415027fdf4b /src/core/hle/kernel/thread.h
parentKernel: Use 0x2C as default main thread priority for homebrew and lone NRO/NSOs (diff)
downloadyuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar.gz
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar.bz2
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar.lz
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar.xz
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.tar.zst
yuzu-46572d027dc9620ed2b2a50277e6afd2a115ab81.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/thread.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 0e0eae28d..e0a3c0934 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -109,6 +109,15 @@ public:
*/
void BoostPriority(u32 priority);
+ /// Adds a thread to the list of threads that are waiting for a lock held by this thread.
+ void AddMutexWaiter(SharedPtr<Thread> thread);
+
+ /// Removes a thread from the list of threads that are waiting for a lock held by this thread.
+ void RemoveMutexWaiter(SharedPtr<Thread> thread);
+
+ /// Recalculates the current priority taking into account priority inheritance.
+ void UpdatePriority();
+
/**
* Gets the thread's thread ID
* @return The thread's ID
@@ -205,6 +214,12 @@ public:
// passed to WaitSynchronization1/N.
std::vector<SharedPtr<WaitObject>> wait_objects;
+ /// List of threads that are waiting for a mutex that is held by this thread.
+ std::vector<SharedPtr<Thread>> wait_mutex_threads;
+
+ /// Thread that owns the lock that this thread is waiting for.
+ SharedPtr<Thread> lock_owner;
+
// If waiting on a ConditionVariable, this is the ConditionVariable address
VAddr condvar_wait_address;
VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address