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:
Lioncash 2018-07-19 21:39:05 -04:00
parent b55fa06eef
commit 059d0017f1
10 changed files with 92 additions and 93 deletions

View file

@ -110,10 +110,10 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) {
result = hle_handler->HandleSyncRequest(context);
}
if (thread->status == THREADSTATUS_RUNNING) {
if (thread->status == ThreadStatus::Running) {
// Put the thread to sleep until the server replies, it will be awoken in
// svcReplyAndReceive for LLE servers.
thread->status = THREADSTATUS_WAIT_IPC;
thread->status = ThreadStatus::WaitIPC;
if (hle_handler != nullptr) {
// For HLE services, we put the request threads to sleep for a short duration to