diff options
| author | 2015-01-07 20:45:05 -0500 | |
|---|---|---|
| committer | 2015-01-07 20:45:05 -0500 | |
| commit | 91d96840ea698edaf5f2b6e8522d18f00bb18d9c (patch) | |
| tree | e9e6288406b16f2a8dd10236c96567a895af3410 /src/core/hle/kernel/thread.h | |
| parent | Merge pull request #404 from bunnei/more-frame-synch-fixes (diff) | |
| parent | Threads: Use a dummy idle thread when no other are ready. (diff) | |
| download | yuzu-91d96840ea698edaf5f2b6e8522d18f00bb18d9c.tar.gz yuzu-91d96840ea698edaf5f2b6e8522d18f00bb18d9c.tar.xz yuzu-91d96840ea698edaf5f2b6e8522d18f00bb18d9c.zip | |
Merge pull request #439 from Subv/idle_thread_m
Threads: Use a dummy idle thread when no other are ready.
Diffstat (limited to 'src/core/hle/kernel/thread.h')
| -rw-r--r-- | src/core/hle/kernel/thread.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 0e1397cd9..dfe92d162 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -104,6 +104,17 @@ ResultVal<u32> GetThreadPriority(const Handle handle); | |||
| 104 | /// Set the priority of the thread specified by handle | 104 | /// Set the priority of the thread specified by handle |
| 105 | ResultCode SetThreadPriority(Handle handle, s32 priority); | 105 | ResultCode SetThreadPriority(Handle handle, s32 priority); |
| 106 | 106 | ||
| 107 | /** | ||
| 108 | * Sets up the idle thread, this is a thread that is intended to never execute instructions, | ||
| 109 | * only to advance the timing. It is scheduled when there are no other ready threads in the thread queue | ||
| 110 | * and will try to yield on every call. | ||
| 111 | * @returns The handle of the idle thread | ||
| 112 | */ | ||
| 113 | Handle SetupIdleThread(); | ||
| 114 | |||
| 115 | /// Whether the current thread is an idle thread | ||
| 116 | bool IsIdleThread(Handle thread); | ||
| 117 | |||
| 107 | /// Initialize threading | 118 | /// Initialize threading |
| 108 | void ThreadingInit(); | 119 | void ThreadingInit(); |
| 109 | 120 | ||