summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 7b4f0ea47..af9188faa 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -200,8 +200,15 @@ Thread* __NextThread() {
200 return Kernel::g_object_pool.GetFast<Thread>(next); 200 return Kernel::g_object_pool.GetFast<Thread>(next);
201} 201}
202 202
203/// Puts a thread in the wait state for the given type/reason
204void __WaitCurThread(WaitType wait_type, const char* reason) {
205 Thread* t = __GetCurrentThread();
206 t->wait_type = wait_type;
207 __ChangeThreadState(t, ThreadStatus(THREADSTATUS_WAIT | (t->status & THREADSTATUS_SUSPEND)));
208}
209
203/// Resumes a thread from waiting by marking it as "ready" 210/// Resumes a thread from waiting by marking it as "ready"
204void __ResumeThreadFromWait(Handle handle) { 211void ResumeThreadFromWait(Handle handle) {
205 u32 error; 212 u32 error;
206 Thread* t = Kernel::g_object_pool.Get<Thread>(handle, error); 213 Thread* t = Kernel::g_object_pool.Get<Thread>(handle, error);
207 if (t) { 214 if (t) {
@@ -212,13 +219,6 @@ void __ResumeThreadFromWait(Handle handle) {
212 } 219 }
213} 220}
214 221
215/// Puts a thread in the wait state for the given type/reason
216void __WaitCurThread(WaitType wait_type, const char* reason) {
217 Thread* t = __GetCurrentThread();
218 t->wait_type = wait_type;
219 __ChangeThreadState(t, ThreadStatus(THREADSTATUS_WAIT | (t->status & THREADSTATUS_SUSPEND)));
220}
221
222/// Creates a new thread 222/// Creates a new thread
223Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 priority, 223Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 priority,
224 s32 processor_id, u32 stack_top, int stack_size) { 224 s32 processor_id, u32 stack_top, int stack_size) {