summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-20 03:39:05 +0200
committerLioncash <mathew1800@gmail.com>2018-07-20 04:08:56 +0200
commitdbfe82773d98fadac481cd9061f5eda98aebf308 (patch)
treeee1c5f480bcbf95339eff8677f061bbb57d8ee95 /src/core/hle/kernel/mutex.cpp
parentMerge pull request #726 from lioncash/overload (diff)
downloadyuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar.gz
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar.bz2
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar.lz
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar.xz
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.tar.zst
yuzu-dbfe82773d98fadac481cd9061f5eda98aebf308.zip
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r--src/core/hle/kernel/mutex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 65560226d..3f1de3258 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -28,7 +28,7 @@ static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread(
if (thread->mutex_wait_address != mutex_addr)
continue;
- ASSERT(thread->status == THREADSTATUS_WAIT_MUTEX);
+ ASSERT(thread->status == ThreadStatus::WaitMutex);
++num_waiters;
if (highest_priority_thread == nullptr ||
@@ -83,7 +83,7 @@ ResultCode Mutex::TryAcquire(VAddr address, Handle holding_thread_handle,
GetCurrentThread()->mutex_wait_address = address;
GetCurrentThread()->wait_handle = requesting_thread_handle;
- GetCurrentThread()->status = THREADSTATUS_WAIT_MUTEX;
+ GetCurrentThread()->status = ThreadStatus::WaitMutex;
GetCurrentThread()->wakeup_callback = nullptr;
// Update the lock holder thread's priority to prevent priority inversion.
@@ -121,7 +121,7 @@ ResultCode Mutex::Release(VAddr address) {
// Grant the mutex to the next waiting thread and resume it.
Memory::Write32(address, mutex_value);
- ASSERT(thread->status == THREADSTATUS_WAIT_MUTEX);
+ ASSERT(thread->status == ThreadStatus::WaitMutex);
thread->ResumeFromWait();
thread->lock_owner = nullptr;