summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-06-10 04:08:49 +0200
committerbunnei <ericbunnie@gmail.com>2014-06-13 15:51:16 +0200
commit5b7cf50a7760ea1d4202ac3890cefc8934ac841f (patch)
treef94a7a1dab9a9429ea73d16cf61102ccef2bc0e1 /src/core/hle/kernel
parentHLE: Removed usnused EatCycles function. (diff)
downloadyuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar.gz
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar.bz2
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar.lz
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar.xz
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.tar.zst
yuzu-5b7cf50a7760ea1d4202ac3890cefc8934ac841f.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/thread.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index ebe308a93..baa9687cb 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -143,16 +143,14 @@ void ChangeReadyState(Thread* t, bool ready) {
}
/// Verify that a thread has not been released from waiting
-inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) {
- Handle wait_id = 0;
- Thread* t = g_object_pool.GetFast<Thread>(thread);
- if (t != nullptr && type == t->wait_type && handle == t->wait_handle) {
- return true;
- } else {
- ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread);
+inline bool VerifyWait(const Handle& handle, WaitType type, Handle wait_handle) {
+ Thread* thread = g_object_pool.GetFast<Thread>(handle);
+ _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!");
+
+ if (type != thread->wait_type || wait_handle != thread->wait_handle)
return false;
- }
- return false;
+
+ return true;
}
/// Stops the current thread