diff options
| author | 2021-02-18 18:38:23 -0800 | |
|---|---|---|
| committer | 2021-03-21 14:45:02 -0700 | |
| commit | 57625177289624051e107578ccfce749a083f51a (patch) | |
| tree | 621cbc34ccd83fbe64e6d9e5cd4f7ca2bb4db6f5 /src/core/hle/kernel | |
| parent | hle: kernel: KMemoryManager: Add CalculateManagementOverheadSize. (diff) | |
| download | yuzu-57625177289624051e107578ccfce749a083f51a.tar.gz yuzu-57625177289624051e107578ccfce749a083f51a.tar.xz yuzu-57625177289624051e107578ccfce749a083f51a.zip | |
hle: kernel: KSystemControl: Update to reflect board-specific behavior.
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp (renamed from src/core/hle/kernel/k_system_control.cpp) | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/board/nintendo/nx/k_system_control.h | 22 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_system_control.h | 18 |
3 files changed, 39 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp index aa1682f69..0f41c4110 100644 --- a/src/core/hle/kernel/k_system_control.cpp +++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp | |||
| @@ -6,7 +6,11 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/kernel/k_system_control.h" | 7 | #include "core/hle/kernel/k_system_control.h" |
| 8 | 8 | ||
| 9 | namespace Kernel { | 9 | namespace Kernel::Board::Nintendo::Nx { |
| 10 | |||
| 11 | bool KSystemControl::Init::ShouldIncreaseThreadResourceLimit() { | ||
| 12 | return true; | ||
| 13 | } | ||
| 10 | 14 | ||
| 11 | namespace { | 15 | namespace { |
| 12 | template <typename F> | 16 | template <typename F> |
| @@ -39,4 +43,4 @@ u64 KSystemControl::GenerateRandomRange(u64 min, u64 max) { | |||
| 39 | return GenerateUniformRange(min, max, GenerateRandomU64); | 43 | return GenerateUniformRange(min, max, GenerateRandomU64); |
| 40 | } | 44 | } |
| 41 | 45 | ||
| 42 | } // namespace Kernel | 46 | } // namespace Kernel::Board::Nintendo::Nx |
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.h b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h new file mode 100644 index 000000000..3fde61971 --- /dev/null +++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | namespace Kernel::Board::Nintendo::Nx { | ||
| 10 | |||
| 11 | class KSystemControl { | ||
| 12 | public: | ||
| 13 | class Init { | ||
| 14 | public: | ||
| 15 | static bool ShouldIncreaseThreadResourceLimit(); | ||
| 16 | }; | ||
| 17 | |||
| 18 | static u64 GenerateRandomRange(u64 min, u64 max); | ||
| 19 | static u64 GenerateRandomU64(); | ||
| 20 | }; | ||
| 21 | |||
| 22 | } // namespace Kernel::Board::Nintendo::Nx | ||
diff --git a/src/core/hle/kernel/k_system_control.h b/src/core/hle/kernel/k_system_control.h index 1d5b64ffa..d755082c2 100644 --- a/src/core/hle/kernel/k_system_control.h +++ b/src/core/hle/kernel/k_system_control.h | |||
| @@ -6,14 +6,18 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | 8 | ||
| 9 | namespace Kernel { | 9 | #define BOARD_NINTENDO_NX |
| 10 | |||
| 11 | #ifdef BOARD_NINTENDO_NX | ||
| 10 | 12 | ||
| 11 | class KSystemControl { | 13 | #include "core/hle/kernel/board/nintendo/nx/k_system_control.h" |
| 12 | public: | ||
| 13 | KSystemControl() = default; | ||
| 14 | 14 | ||
| 15 | static u64 GenerateRandomRange(u64 min, u64 max); | 15 | namespace Kernel { |
| 16 | static u64 GenerateRandomU64(); | 16 | |
| 17 | }; | 17 | using Kernel::Board::Nintendo::Nx::KSystemControl; |
| 18 | 18 | ||
| 19 | } // namespace Kernel | 19 | } // namespace Kernel |
| 20 | |||
| 21 | #else | ||
| 22 | #error "Unknown board for KSystemControl" | ||
| 23 | #endif | ||