thread: Convert ThreadStatus into an enum class
Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time.
This commit is contained in:
parent
2ba62ec196
commit
5dfa7b74b5
9 changed files with 89 additions and 90 deletions
|
@ -198,11 +198,11 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_ses
|
|||
handler_invoker(this, info->handler_callback, context);
|
||||
|
||||
auto thread = Kernel::GetCurrentThread();
|
||||
ASSERT(thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_WAIT_HLE_EVENT);
|
||||
ASSERT(thread->status == ThreadStatus::Running || thread->status == ThreadStatus::WaitHleEvent);
|
||||
// Only write the response immediately if the thread is still running. If the HLE handler put
|
||||
// the thread to sleep then the writing of the command buffer will be deferred to the wakeup
|
||||
// callback.
|
||||
if (thread->status == THREADSTATUS_RUNNING) {
|
||||
if (thread->status == ThreadStatus::Running) {
|
||||
context.WriteToOutgoingCommandBuffer(cmd_buf, *Kernel::g_current_process,
|
||||
Kernel::g_handle_table);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue