summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-14 12:13:16 -0400
committerGravatar bunnei2014-06-14 12:13:16 -0400
commit004df767953a949817da89bddcd5d1379240f769 (patch)
treeb2d54928dcbf3cb4dde0cd5d3277afe7999b7bd9 /src/core/hle/kernel/thread.h
parentGPU debugger: Const correctness and build fix. (diff)
parentKernel: Removed unnecessary "#pragma once". (diff)
downloadyuzu-004df767953a949817da89bddcd5d1379240f769.tar.gz
yuzu-004df767953a949817da89bddcd5d1379240f769.tar.xz
yuzu-004df767953a949817da89bddcd5d1379240f769.zip
Merge branch 'threading' of https://github.com/bunnei/citra
Conflicts: src/core/hle/function_wrappers.h src/core/hle/service/gsp.cpp
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 9628f165d..04914ba90 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -34,7 +34,7 @@ enum WaitType {
34 WAITTYPE_NONE, 34 WAITTYPE_NONE,
35 WAITTYPE_SLEEP, 35 WAITTYPE_SLEEP,
36 WAITTYPE_SEMA, 36 WAITTYPE_SEMA,
37 WAITTYPE_EVENTFLAG, 37 WAITTYPE_EVENT,
38 WAITTYPE_THREADEND, 38 WAITTYPE_THREADEND,
39 WAITTYPE_VBLANK, 39 WAITTYPE_VBLANK,
40 WAITTYPE_MUTEX, 40 WAITTYPE_MUTEX,
@@ -53,8 +53,8 @@ Handle SetupMainThread(s32 priority, int stack_size=Kernel::DEFAULT_STACK_SIZE);
53/// Reschedules to the next available thread (call after current thread is suspended) 53/// Reschedules to the next available thread (call after current thread is suspended)
54void Reschedule(); 54void Reschedule();
55 55
56/// Puts the current thread in the wait state for the given type 56/// Stops the current thread
57void WaitCurrentThread(WaitType wait_type); 57void StopThread(Handle thread, const char* reason);
58 58
59/// Resumes a thread from waiting by marking it as "ready" 59/// Resumes a thread from waiting by marking it as "ready"
60void ResumeThreadFromWait(Handle handle); 60void ResumeThreadFromWait(Handle handle);
@@ -62,9 +62,18 @@ void ResumeThreadFromWait(Handle handle);
62/// Gets the current thread handle 62/// Gets the current thread handle
63Handle GetCurrentThreadHandle(); 63Handle GetCurrentThreadHandle();
64 64
65/// Puts the current thread in the wait state for the given type
66void WaitCurrentThread(WaitType wait_type, Handle wait_handle=GetCurrentThreadHandle());
67
65/// Put current thread in a wait state - on WaitSynchronization 68/// Put current thread in a wait state - on WaitSynchronization
66void WaitThread_Synchronization(); 69void WaitThread_Synchronization();
67 70
71/// Get the priority of the thread specified by handle
72u32 GetThreadPriority(const Handle handle);
73
74/// Set the priority of the thread specified by handle
75Result SetThreadPriority(Handle handle, s32 priority);
76
68/// Initialize threading 77/// Initialize threading
69void ThreadingInit(); 78void ThreadingInit();
70 79