diff options
| author | 2017-01-02 19:38:08 -0500 | |
|---|---|---|
| committer | 2017-01-04 15:58:48 -0500 | |
| commit | d3ff5b91e14356912589f9bac47fccbe79e07279 (patch) | |
| tree | e35c698d40539e360981a61b38f8fbb60aee7418 /src/core/hle/svc.cpp | |
| parent | Kernel/Mutex: Update a mutex priority when a thread stops waiting on it. (diff) | |
| download | yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.gz yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.tar.xz yuzu-d3ff5b91e14356912589f9bac47fccbe79e07279.zip | |
Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexes
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index b6e34a9e9..160f27c98 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -611,6 +611,12 @@ static ResultCode SetThreadPriority(Kernel::Handle handle, s32 priority) { | |||
| 611 | return ERR_INVALID_HANDLE; | 611 | return ERR_INVALID_HANDLE; |
| 612 | 612 | ||
| 613 | thread->SetPriority(priority); | 613 | thread->SetPriority(priority); |
| 614 | thread->UpdatePriority(); | ||
| 615 | |||
| 616 | // Update the mutexes that this thread is waiting for | ||
| 617 | for (auto& mutex : thread->pending_mutexes) | ||
| 618 | mutex->UpdatePriority(); | ||
| 619 | |||
| 614 | Core::System::GetInstance().PrepareReschedule(); | 620 | Core::System::GetInstance().PrepareReschedule(); |
| 615 | return RESULT_SUCCESS; | 621 | return RESULT_SUCCESS; |
| 616 | } | 622 | } |