summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/semaphore.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-29 13:55:30 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-01-09 22:43:52 +0100
commit8ad41775ccae67e54e9f03cbe054d7562b1c66ce (patch)
tree79d176bd9805cae0a2cfdd12e4c91c108bec0c8d /src/core/hle/kernel/semaphore.cpp
parentKernel: Don't re-assign object's handle when duplicating one (diff)
downloadyuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.gz
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.bz2
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.lz
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.xz
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.zst
yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.zip
Diffstat (limited to 'src/core/hle/kernel/semaphore.cpp')
-rw-r--r--src/core/hle/kernel/semaphore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index d7eeaa3da..88ec9a104 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -70,7 +70,7 @@ ResultCode CreateSemaphore(Handle* handle, s32 initial_count,
}
ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
- Semaphore* semaphore = g_handle_table.Get<Semaphore>(handle);
+ Semaphore* semaphore = g_handle_table.Get<Semaphore>(handle).get();
if (semaphore == nullptr)
return InvalidHandle(ErrorModule::Kernel);
@@ -84,7 +84,7 @@ ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
// Notify some of the threads that the semaphore has been released
// stop once the semaphore is full again or there are no more waiting threads
while (!semaphore->waiting_threads.empty() && semaphore->IsAvailable()) {
- Thread* thread = Kernel::g_handle_table.Get<Thread>(semaphore->waiting_threads.front());
+ Thread* thread = Kernel::g_handle_table.Get<Thread>(semaphore->waiting_threads.front()).get();
if (thread != nullptr)
thread->ResumeFromWait();
semaphore->waiting_threads.pop();