diff options
author | Subv <subv2112@gmail.com> | 2018-04-21 03:15:16 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-23 18:23:44 +0200 |
commit | 46572d027dc9620ed2b2a50277e6afd2a115ab81 (patch) | |
tree | 72562a37575252e8f4c0160a3067b415027fdf4b /src/core/hle/kernel/thread.h | |
parent | Kernel: Use 0x2C as default main thread priority for homebrew and lone NRO/NSOs (diff) | |
download | yuzu-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 'src/core/hle/kernel/thread.h')
-rw-r--r-- | src/core/hle/kernel/thread.h | 15 |
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 |