|
|
@ -143,16 +143,14 @@ void ChangeReadyState(Thread* t, bool ready) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Verify that a thread has not been released from waiting
|
|
|
|
/// Verify that a thread has not been released from waiting
|
|
|
|
inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) {
|
|
|
|
inline bool VerifyWait(const Handle& handle, WaitType type, Handle wait_handle) {
|
|
|
|
Handle wait_id = 0;
|
|
|
|
Thread* thread = g_object_pool.GetFast<Thread>(handle);
|
|
|
|
Thread* t = g_object_pool.GetFast<Thread>(thread);
|
|
|
|
_assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!");
|
|
|
|
if (t != nullptr && type == t->wait_type && handle == t->wait_handle) {
|
|
|
|
|
|
|
|
|
|
|
|
if (type != thread->wait_type || wait_handle != thread->wait_handle)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Stops the current thread
|
|
|
|
/// Stops the current thread
|
|
|
|