diff options
| author | 2023-03-03 14:42:00 -0800 | |
|---|---|---|
| committer | 2023-03-03 14:42:00 -0800 | |
| commit | 1f98634371838cc94d01613497660937f70ff78b (patch) | |
| tree | 7760b21a8fe3a407d49b531994784e43fcd87894 /src/core/hle/kernel/init | |
| parent | ci: Actually enable LTO on MSVC (#9887) (diff) | |
| parent | kernel: be more careful about kernel address keys (diff) | |
| download | yuzu-1f98634371838cc94d01613497660937f70ff78b.tar.gz yuzu-1f98634371838cc94d01613497660937f70ff78b.tar.xz yuzu-1f98634371838cc94d01613497660937f70ff78b.zip | |
Merge pull request #9855 from liamwhite/kern-16-support
kernel: support for 16.0.0
Diffstat (limited to 'src/core/hle/kernel/init')
| -rw-r--r-- | src/core/hle/kernel/init/init_slab_setup.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp index abdb5639f..5e4090e2b 100644 --- a/src/core/hle/kernel/init/init_slab_setup.cpp +++ b/src/core/hle/kernel/init/init_slab_setup.cpp | |||
| @@ -33,6 +33,9 @@ | |||
| 33 | 33 | ||
| 34 | namespace Kernel::Init { | 34 | namespace Kernel::Init { |
| 35 | 35 | ||
| 36 | // For macro convenience. | ||
| 37 | using KThreadLockInfo = KThread::LockWithPriorityInheritanceInfo; | ||
| 38 | |||
| 36 | #define SLAB_COUNT(CLASS) kernel.SlabResourceCounts().num_##CLASS | 39 | #define SLAB_COUNT(CLASS) kernel.SlabResourceCounts().num_##CLASS |
| 37 | 40 | ||
| 38 | #define FOREACH_SLAB_TYPE(HANDLER, ...) \ | 41 | #define FOREACH_SLAB_TYPE(HANDLER, ...) \ |
| @@ -54,7 +57,8 @@ namespace Kernel::Init { | |||
| 54 | HANDLER(KResourceLimit, (SLAB_COUNT(KResourceLimit)), ##__VA_ARGS__) \ | 57 | HANDLER(KResourceLimit, (SLAB_COUNT(KResourceLimit)), ##__VA_ARGS__) \ |
| 55 | HANDLER(KEventInfo, (SLAB_COUNT(KThread) + SLAB_COUNT(KDebug)), ##__VA_ARGS__) \ | 58 | HANDLER(KEventInfo, (SLAB_COUNT(KThread) + SLAB_COUNT(KDebug)), ##__VA_ARGS__) \ |
| 56 | HANDLER(KDebug, (SLAB_COUNT(KDebug)), ##__VA_ARGS__) \ | 59 | HANDLER(KDebug, (SLAB_COUNT(KDebug)), ##__VA_ARGS__) \ |
| 57 | HANDLER(KSecureSystemResource, (SLAB_COUNT(KProcess)), ##__VA_ARGS__) | 60 | HANDLER(KSecureSystemResource, (SLAB_COUNT(KProcess)), ##__VA_ARGS__) \ |
| 61 | HANDLER(KThreadLockInfo, (SLAB_COUNT(KThread)), ##__VA_ARGS__) | ||
| 58 | 62 | ||
| 59 | namespace { | 63 | namespace { |
| 60 | 64 | ||
| @@ -131,7 +135,7 @@ VAddr InitializeSlabHeap(Core::System& system, KMemoryLayout& memory_layout, VAd | |||
| 131 | } | 135 | } |
| 132 | 136 | ||
| 133 | size_t CalculateSlabHeapGapSize() { | 137 | size_t CalculateSlabHeapGapSize() { |
| 134 | constexpr size_t KernelSlabHeapGapSize = 2_MiB - 320_KiB; | 138 | constexpr size_t KernelSlabHeapGapSize = 2_MiB - 356_KiB; |
| 135 | static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax); | 139 | static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax); |
| 136 | return KernelSlabHeapGapSize; | 140 | return KernelSlabHeapGapSize; |
| 137 | } | 141 | } |