diff options
| author | bunnei <bunneidev@gmail.com> | 2021-08-14 02:14:19 -0700 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2021-12-06 16:39:17 -0800 |
| commit | 3dc803a430107fb22ffc91608c613e09ec5c8b51 (patch) | |
| tree | f8d5a747cf9d89befd89beec16bdc116d2725fe8 /src/core/hle/kernel/k_thread.h | |
| parent | d14b8fc7471061b84e7de0bd982a64660ee7f349 (diff) | |
core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
Diffstat (limited to 'src/core/hle/kernel/k_thread.h')
| -rw-r--r-- | src/core/hle/kernel/k_thread.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index 8bbf66c52..e4c4c877d 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -454,8 +454,12 @@ public: return GetActiveCore() == 3; } + [[nodiscard]] bool IsDispatchTrackingDisabled() const { + return is_single_core || IsKernelThread(); + } + [[nodiscard]] s32 GetDisableDispatchCount() const { - if (IsKernelThread()) { + if (IsDispatchTrackingDisabled()) { // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. return 1; } @@ -464,7 +468,7 @@ public: } void DisableDispatch() { - if (IsKernelThread()) { + if (IsDispatchTrackingDisabled()) { // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. return; } @@ -474,7 +478,7 @@ public: } void EnableDispatch() { - if (IsKernelThread()) { + if (IsDispatchTrackingDisabled()) { // TODO(bunnei): Until kernel threads are emulated, we cannot enable/disable dispatch. return; } @@ -727,6 +731,7 @@ private: // For emulation std::shared_ptr<Common::Fiber> host_context{}; + bool is_single_core{}; // For debugging std::vector<KSynchronizationObject*> wait_objects_for_debugging; |
