diff options
| author | 2014-06-14 12:13:16 -0400 | |
|---|---|---|
| committer | 2014-06-14 12:13:16 -0400 | |
| commit | 004df767953a949817da89bddcd5d1379240f769 (patch) | |
| tree | b2d54928dcbf3cb4dde0cd5d3277afe7999b7bd9 /src/core/hle/kernel/thread.h | |
| parent | GPU debugger: Const correctness and build fix. (diff) | |
| parent | Kernel: Removed unnecessary "#pragma once". (diff) | |
| download | yuzu-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.h | 15 |
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) |
| 54 | void Reschedule(); | 54 | void Reschedule(); |
| 55 | 55 | ||
| 56 | /// Puts the current thread in the wait state for the given type | 56 | /// Stops the current thread |
| 57 | void WaitCurrentThread(WaitType wait_type); | 57 | void 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" |
| 60 | void ResumeThreadFromWait(Handle handle); | 60 | void ResumeThreadFromWait(Handle handle); |
| @@ -62,9 +62,18 @@ void ResumeThreadFromWait(Handle handle); | |||
| 62 | /// Gets the current thread handle | 62 | /// Gets the current thread handle |
| 63 | Handle GetCurrentThreadHandle(); | 63 | Handle GetCurrentThreadHandle(); |
| 64 | 64 | ||
| 65 | /// Puts the current thread in the wait state for the given type | ||
| 66 | void 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 |
| 66 | void WaitThread_Synchronization(); | 69 | void WaitThread_Synchronization(); |
| 67 | 70 | ||
| 71 | /// Get the priority of the thread specified by handle | ||
| 72 | u32 GetThreadPriority(const Handle handle); | ||
| 73 | |||
| 74 | /// Set the priority of the thread specified by handle | ||
| 75 | Result SetThreadPriority(Handle handle, s32 priority); | ||
| 76 | |||
| 68 | /// Initialize threading | 77 | /// Initialize threading |
| 69 | void ThreadingInit(); | 78 | void ThreadingInit(); |
| 70 | 79 | ||