diff options
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index e479dacde..c14d2d2f3 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -68,8 +68,6 @@ struct KernelCore::Impl { | |||
| 68 | 68 | ||
| 69 | global_object_list_container = std::make_unique<KAutoObjectWithListContainer>(kernel); | 69 | global_object_list_container = std::make_unique<KAutoObjectWithListContainer>(kernel); |
| 70 | global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel); | 70 | global_scheduler_context = std::make_unique<Kernel::GlobalSchedulerContext>(kernel); |
| 71 | global_handle_table = std::make_unique<Kernel::KHandleTable>(kernel); | ||
| 72 | global_handle_table->Initialize(KHandleTable::MaxTableSize); | ||
| 73 | 71 | ||
| 74 | is_phantom_mode_for_singlecore = false; | 72 | is_phantom_mode_for_singlecore = false; |
| 75 | 73 | ||
| @@ -121,13 +119,8 @@ struct KernelCore::Impl { | |||
| 121 | next_user_process_id = KProcess::ProcessIdMin; | 119 | next_user_process_id = KProcess::ProcessIdMin; |
| 122 | next_thread_id = 1; | 120 | next_thread_id = 1; |
| 123 | 121 | ||
| 124 | global_handle_table->Finalize(); | ||
| 125 | global_handle_table.reset(); | ||
| 126 | |||
| 127 | preemption_event = nullptr; | 122 | preemption_event = nullptr; |
| 128 | 123 | ||
| 129 | exclusive_monitor.reset(); | ||
| 130 | |||
| 131 | // Cleanup persistent kernel objects | 124 | // Cleanup persistent kernel objects |
| 132 | auto CleanupObject = [](KAutoObject* obj) { | 125 | auto CleanupObject = [](KAutoObject* obj) { |
| 133 | if (obj) { | 126 | if (obj) { |
| @@ -191,8 +184,6 @@ struct KernelCore::Impl { | |||
| 191 | } | 184 | } |
| 192 | 185 | ||
| 193 | void InitializePhysicalCores() { | 186 | void InitializePhysicalCores() { |
| 194 | exclusive_monitor = | ||
| 195 | Core::MakeExclusiveMonitor(system.ApplicationMemory(), Core::Hardware::NUM_CPU_CORES); | ||
| 196 | for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { | 187 | for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { |
| 197 | const s32 core{static_cast<s32>(i)}; | 188 | const s32 core{static_cast<s32>(i)}; |
| 198 | 189 | ||
| @@ -791,10 +782,6 @@ struct KernelCore::Impl { | |||
| 791 | 782 | ||
| 792 | std::shared_ptr<Core::Timing::EventType> preemption_event; | 783 | std::shared_ptr<Core::Timing::EventType> preemption_event; |
| 793 | 784 | ||
| 794 | // This is the kernel's handle table or supervisor handle table which | ||
| 795 | // stores all the objects in place. | ||
| 796 | std::unique_ptr<KHandleTable> global_handle_table; | ||
| 797 | |||
| 798 | std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container; | 785 | std::unique_ptr<KAutoObjectWithListContainer> global_object_list_container; |
| 799 | 786 | ||
| 800 | std::unique_ptr<KObjectNameGlobalData> object_name_global_data; | 787 | std::unique_ptr<KObjectNameGlobalData> object_name_global_data; |
| @@ -805,7 +792,6 @@ struct KernelCore::Impl { | |||
| 805 | std::mutex server_lock; | 792 | std::mutex server_lock; |
| 806 | std::vector<std::unique_ptr<Service::ServerManager>> server_managers; | 793 | std::vector<std::unique_ptr<Service::ServerManager>> server_managers; |
| 807 | 794 | ||
| 808 | std::unique_ptr<Core::ExclusiveMonitor> exclusive_monitor; | ||
| 809 | std::array<std::unique_ptr<Kernel::PhysicalCore>, Core::Hardware::NUM_CPU_CORES> cores; | 795 | std::array<std::unique_ptr<Kernel::PhysicalCore>, Core::Hardware::NUM_CPU_CORES> cores; |
| 810 | 796 | ||
| 811 | // Next host thead ID to use, 0-3 IDs represent core threads, >3 represent others | 797 | // Next host thead ID to use, 0-3 IDs represent core threads, >3 represent others |
| @@ -882,10 +868,6 @@ KResourceLimit* KernelCore::GetSystemResourceLimit() { | |||
| 882 | return impl->system_resource_limit; | 868 | return impl->system_resource_limit; |
| 883 | } | 869 | } |
| 884 | 870 | ||
| 885 | KScopedAutoObject<KThread> KernelCore::RetrieveThreadFromGlobalHandleTable(Handle handle) const { | ||
| 886 | return impl->global_handle_table->GetObject<KThread>(handle); | ||
| 887 | } | ||
| 888 | |||
| 889 | void KernelCore::AppendNewProcess(KProcess* process) { | 871 | void KernelCore::AppendNewProcess(KProcess* process) { |
| 890 | impl->process_list.push_back(process); | 872 | impl->process_list.push_back(process); |
| 891 | } | 873 | } |
| @@ -959,14 +941,6 @@ Kernel::KHardwareTimer& KernelCore::HardwareTimer() { | |||
| 959 | return *impl->hardware_timer; | 941 | return *impl->hardware_timer; |
| 960 | } | 942 | } |
| 961 | 943 | ||
| 962 | Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() { | ||
| 963 | return *impl->exclusive_monitor; | ||
| 964 | } | ||
| 965 | |||
| 966 | const Core::ExclusiveMonitor& KernelCore::GetExclusiveMonitor() const { | ||
| 967 | return *impl->exclusive_monitor; | ||
| 968 | } | ||
| 969 | |||
| 970 | KAutoObjectWithListContainer& KernelCore::ObjectListContainer() { | 944 | KAutoObjectWithListContainer& KernelCore::ObjectListContainer() { |
| 971 | return *impl->global_object_list_container; | 945 | return *impl->global_object_list_container; |
| 972 | } | 946 | } |
| @@ -1030,14 +1004,6 @@ u64 KernelCore::CreateNewUserProcessID() { | |||
| 1030 | return impl->next_user_process_id++; | 1004 | return impl->next_user_process_id++; |
| 1031 | } | 1005 | } |
| 1032 | 1006 | ||
| 1033 | KHandleTable& KernelCore::GlobalHandleTable() { | ||
| 1034 | return *impl->global_handle_table; | ||
| 1035 | } | ||
| 1036 | |||
| 1037 | const KHandleTable& KernelCore::GlobalHandleTable() const { | ||
| 1038 | return *impl->global_handle_table; | ||
| 1039 | } | ||
| 1040 | |||
| 1041 | void KernelCore::RegisterCoreThread(std::size_t core_id) { | 1007 | void KernelCore::RegisterCoreThread(std::size_t core_id) { |
| 1042 | impl->RegisterCoreThread(core_id); | 1008 | impl->RegisterCoreThread(core_id); |
| 1043 | } | 1009 | } |