diff options
| author | 2020-04-05 09:48:53 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:09 -0400 | |
| commit | 528b19a84287167d7699465e495b196d216b99db (patch) | |
| tree | c3ac61644c1a11fd1cf5ceeb70d1c9f5d4a00aa3 /src/common/thread.h | |
| parent | Dynarmic Interface: don't clear cache if JIT has not been created. (diff) | |
| download | yuzu-528b19a84287167d7699465e495b196d216b99db.tar.gz yuzu-528b19a84287167d7699465e495b196d216b99db.tar.xz yuzu-528b19a84287167d7699465e495b196d216b99db.zip | |
General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.
Diffstat (limited to 'src/common/thread.h')
| -rw-r--r-- | src/common/thread.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/thread.h b/src/common/thread.h index 127cc7e23..52b359413 100644 --- a/src/common/thread.h +++ b/src/common/thread.h | |||
| @@ -86,6 +86,15 @@ private: | |||
| 86 | std::size_t generation = 0; // Incremented once each time the barrier is used | 86 | std::size_t generation = 0; // Incremented once each time the barrier is used |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | enum class ThreadPriority : u32 { | ||
| 90 | Low = 0, | ||
| 91 | Normal = 1, | ||
| 92 | High = 2, | ||
| 93 | VeryHigh = 3, | ||
| 94 | }; | ||
| 95 | |||
| 96 | void SetCurrentThreadPriority(ThreadPriority new_priority); | ||
| 97 | |||
| 89 | void SetCurrentThreadName(const char* name); | 98 | void SetCurrentThreadName(const char* name); |
| 90 | 99 | ||
| 91 | } // namespace Common | 100 | } // namespace Common |