mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 10:02:31 -06:00
kernel: Nullability check for current_cpu when changing memory page table
This attempts to fix segfault in some tests where page table is set before initializing cpu core (intended behaviour? might be worth a check...) see: src/tests/core/arm/arm_test_common.cpp see: src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp
This commit is contained in:
parent
dbfd830695
commit
ed095f3bff
1 changed files with 3 additions and 1 deletions
|
@ -53,7 +53,9 @@ void KernelSystem::SetCurrentProcess(std::shared_ptr<Process> process) {
|
||||||
|
|
||||||
void KernelSystem::SetCurrentMemPageTable(Memory::PageTable* page_table) {
|
void KernelSystem::SetCurrentMemPageTable(Memory::PageTable* page_table) {
|
||||||
memory.SetCurrentPageTable(page_table);
|
memory.SetCurrentPageTable(page_table);
|
||||||
current_cpu->PageTableChanged(); // notify the CPU the page table in memory has changed
|
if (current_cpu != nullptr) {
|
||||||
|
current_cpu->PageTableChanged(); // notify the CPU the page table in memory has changed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KernelSystem::SetCPU(std::shared_ptr<ARM_Interface> cpu) {
|
void KernelSystem::SetCPU(std::shared_ptr<ARM_Interface> cpu) {
|
||||||
|
|
Loading…
Reference in a new issue