Thread: Updated VerifyWait to be more readable (but functionally the same).
This commit is contained in:
parent
3f469e147f
commit
b05ed89f4a
1 changed files with 3 additions and 4 deletions
|
@ -145,12 +145,11 @@ void ChangeReadyState(Thread* t, bool ready) {
|
||||||
inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) {
|
inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) {
|
||||||
Handle wait_id = 0;
|
Handle wait_id = 0;
|
||||||
Thread *t = g_object_pool.GetFast<Thread>(thread);
|
Thread *t = g_object_pool.GetFast<Thread>(thread);
|
||||||
if (t) {
|
if (t != nullptr && type == t->wait_type && handle == t->wait_handle) {
|
||||||
if (type == t->wait_type && handle == t->wait_handle) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread);
|
ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue