From 8ad41775ccae67e54e9f03cbe054d7562b1c66ce Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 29 Dec 2014 10:55:30 -0200 Subject: Kernel: Start using boost::intrusive_ptr for lifetime management --- src/core/hle/kernel/semaphore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/semaphore.cpp') diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp index d7eeaa3d..88ec9a10 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(handle); + Semaphore* semaphore = g_handle_table.Get(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(semaphore->waiting_threads.front()); + Thread* thread = Kernel::g_handle_table.Get(semaphore->waiting_threads.front()).get(); if (thread != nullptr) thread->ResumeFromWait(); semaphore->waiting_threads.pop(); -- cgit v1.2.3