From dbfe82773d98fadac481cd9061f5eda98aebf308 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Jul 2018 21:39:05 -0400 Subject: 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. --- src/core/hle/kernel/server_session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/server_session.cpp') diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 19d17af4f..29b163528 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -110,10 +110,10 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr 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 -- cgit v1.2.3