diff options
| author | 2017-10-09 23:56:20 -0400 | |
|---|---|---|
| committer | 2017-10-09 23:56:20 -0400 | |
| commit | b1d5db1cf60344b6b081c9d03cb6ccc3264326cd (patch) | |
| tree | fde377c4ba3c0f92c032e6f5ec8627aae37270ef /src/core/hle/kernel/mutex.cpp | |
| parent | loader: Various improvements for NSO/NRO loaders. (diff) | |
| parent | Merge pull request #2996 from MerryMage/split-travis (diff) | |
| download | yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.gz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.xz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.zip | |
Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index cef961289..30dade552 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -25,10 +25,11 @@ void ReleaseThreadMutexes(Thread* thread) { | |||
| 25 | Mutex::Mutex() {} | 25 | Mutex::Mutex() {} |
| 26 | Mutex::~Mutex() {} | 26 | Mutex::~Mutex() {} |
| 27 | 27 | ||
| 28 | SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { | 28 | SharedPtr<Mutex> Mutex::Create(bool initial_locked, VAddr addr, std::string name) { |
| 29 | SharedPtr<Mutex> mutex(new Mutex); | 29 | SharedPtr<Mutex> mutex(new Mutex); |
| 30 | 30 | ||
| 31 | mutex->lock_count = 0; | 31 | mutex->lock_count = 0; |
| 32 | mutex->addr = addr; | ||
| 32 | mutex->name = std::move(name); | 33 | mutex->name = std::move(name); |
| 33 | mutex->holding_thread = nullptr; | 34 | mutex->holding_thread = nullptr; |
| 34 | 35 | ||
| @@ -90,7 +91,7 @@ void Mutex::UpdatePriority() { | |||
| 90 | if (!holding_thread) | 91 | if (!holding_thread) |
| 91 | return; | 92 | return; |
| 92 | 93 | ||
| 93 | s32 best_priority = THREADPRIO_LOWEST; | 94 | u32 best_priority = THREADPRIO_LOWEST; |
| 94 | for (auto& waiter : GetWaitingThreads()) { | 95 | for (auto& waiter : GetWaitingThreads()) { |
| 95 | if (waiter->current_priority < best_priority) | 96 | if (waiter->current_priority < best_priority) |
| 96 | best_priority = waiter->current_priority; | 97 | best_priority = waiter->current_priority; |