mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 06:34:23 -04:00
libmesosphere: move .s to kernel (prevent manifesting in kernelldr)
This commit is contained in:
parent
8c93eb5712
commit
364b04b68a
21 changed files with 100 additions and 53 deletions
39
mesosphere/kernel/source/kern_kernel_instantiations.cpp
Normal file
39
mesosphere/kernel/source/kern_kernel_instantiations.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <mesosphere.hpp>
|
||||
|
||||
namespace ams::kern {
|
||||
|
||||
/* Declare kernel data members in kernel TU. */
|
||||
Kernel::State Kernel::s_state = Kernel::State::Invalid;
|
||||
KResourceLimit Kernel::s_system_resource_limit;
|
||||
KMemoryManager Kernel::s_memory_manager;
|
||||
KPageTableManager Kernel::s_page_table_manager;
|
||||
KMemoryBlockSlabManager Kernel::s_app_memory_block_manager;
|
||||
KMemoryBlockSlabManager Kernel::s_sys_memory_block_manager;
|
||||
KBlockInfoManager Kernel::s_block_info_manager;
|
||||
KSupervisorPageTable Kernel::s_supervisor_page_table;
|
||||
|
||||
namespace {
|
||||
|
||||
KThread g_main_threads[cpu::NumCores];
|
||||
KThread g_idle_threads[cpu::NumCores];
|
||||
}
|
||||
|
||||
KThread &Kernel::GetMainThread(s32 core_id) { return g_main_threads[core_id]; }
|
||||
KThread &Kernel::GetIdleThread(s32 core_id) { return g_idle_threads[core_id]; }
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue