diff options
| author | 2021-04-03 22:22:36 -0700 | |
|---|---|---|
| committer | 2021-05-05 16:40:50 -0700 | |
| commit | 7ccbdd4d8d3dea7294d2cac38779cceea9745d52 (patch) | |
| tree | 3106289a5c5a6e4bf50bc09a548c8408aa29fbad /src/core/hle/kernel/init | |
| parent | hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. (diff) | |
| download | yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.gz yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.xz yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.zip | |
hle: kernel: Migrate KProcess to KAutoObject.
Diffstat (limited to 'src/core/hle/kernel/init')
| -rw-r--r-- | src/core/hle/kernel/init/init_slab_setup.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/kernel/init/init_slab_setup.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp index a290249c7..a6fed524b 100644 --- a/src/core/hle/kernel/init/init_slab_setup.cpp +++ b/src/core/hle/kernel/init/init_slab_setup.cpp | |||
| @@ -14,13 +14,16 @@ | |||
| 14 | #include "core/hle/kernel/k_system_control.h" | 14 | #include "core/hle/kernel/k_system_control.h" |
| 15 | #include "core/hle/kernel/k_thread.h" | 15 | #include "core/hle/kernel/k_thread.h" |
| 16 | #include "core/hle/kernel/memory_types.h" | 16 | #include "core/hle/kernel/memory_types.h" |
| 17 | #include "core/hle/kernel/process.h" | ||
| 17 | #include "core/memory.h" | 18 | #include "core/memory.h" |
| 18 | 19 | ||
| 19 | namespace Kernel::Init { | 20 | namespace Kernel::Init { |
| 20 | 21 | ||
| 21 | #define SLAB_COUNT(CLASS) g_slab_resource_counts.num_##CLASS | 22 | #define SLAB_COUNT(CLASS) g_slab_resource_counts.num_##CLASS |
| 22 | 23 | ||
| 23 | #define FOREACH_SLAB_TYPE(HANDLER, ...) HANDLER(KThread, (SLAB_COUNT(KThread)), ##__VA_ARGS__) | 24 | #define FOREACH_SLAB_TYPE(HANDLER, ...) \ |
| 25 | HANDLER(Process, (SLAB_COUNT(Process)), ##__VA_ARGS__) \ | ||
| 26 | HANDLER(KThread, (SLAB_COUNT(KThread)), ##__VA_ARGS__) | ||
| 24 | 27 | ||
| 25 | namespace { | 28 | namespace { |
| 26 | 29 | ||
| @@ -33,7 +36,7 @@ enum KSlabType : u32 { | |||
| 33 | #undef DEFINE_SLAB_TYPE_ENUM_MEMBER | 36 | #undef DEFINE_SLAB_TYPE_ENUM_MEMBER |
| 34 | 37 | ||
| 35 | // Constexpr counts. | 38 | // Constexpr counts. |
| 36 | constexpr size_t SlabCountKProcess = 80; | 39 | constexpr size_t SlabCountProcess = 80; |
| 37 | constexpr size_t SlabCountKThread = 800; | 40 | constexpr size_t SlabCountKThread = 800; |
| 38 | constexpr size_t SlabCountKEvent = 700; | 41 | constexpr size_t SlabCountKEvent = 700; |
| 39 | constexpr size_t SlabCountKInterruptEvent = 100; | 42 | constexpr size_t SlabCountKInterruptEvent = 100; |
| @@ -54,7 +57,7 @@ constexpr size_t SlabCountExtraKThread = 160; | |||
| 54 | 57 | ||
| 55 | // Global to hold our resource counts. | 58 | // Global to hold our resource counts. |
| 56 | KSlabResourceCounts g_slab_resource_counts = { | 59 | KSlabResourceCounts g_slab_resource_counts = { |
| 57 | .num_KProcess = SlabCountKProcess, | 60 | .num_Process = SlabCountProcess, |
| 58 | .num_KThread = SlabCountKThread, | 61 | .num_KThread = SlabCountKThread, |
| 59 | .num_KEvent = SlabCountKEvent, | 62 | .num_KEvent = SlabCountKEvent, |
| 60 | .num_KInterruptEvent = SlabCountKInterruptEvent, | 63 | .num_KInterruptEvent = SlabCountKInterruptEvent, |
diff --git a/src/core/hle/kernel/init/init_slab_setup.h b/src/core/hle/kernel/init/init_slab_setup.h index 6418b97ac..8876678b3 100644 --- a/src/core/hle/kernel/init/init_slab_setup.h +++ b/src/core/hle/kernel/init/init_slab_setup.h | |||
| @@ -15,7 +15,7 @@ class KMemoryLayout; | |||
| 15 | namespace Kernel::Init { | 15 | namespace Kernel::Init { |
| 16 | 16 | ||
| 17 | struct KSlabResourceCounts { | 17 | struct KSlabResourceCounts { |
| 18 | size_t num_KProcess; | 18 | size_t num_Process; |
| 19 | size_t num_KThread; | 19 | size_t num_KThread; |
| 20 | size_t num_KEvent; | 20 | size_t num_KEvent; |
| 21 | size_t num_KInterruptEvent; | 21 | size_t num_KInterruptEvent; |