mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-23 07:10:09 +00:00
Thread: Cleaned up VerifyWait, fixed issue where nullptr msg could unnecessarily be logged.
This commit is contained in:
parent
95441df10d
commit
0940335242
@ -142,16 +142,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) {
|
||||
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 true;
|
||||
} else {
|
||||
ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Stops the current thread
|
||||
|
Loading…
Reference in New Issue
Block a user