kernel: Preserve the new page directory while exec() is running
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
2b7537acba
commit
868213bb85
@ -235,7 +235,7 @@ namespace Scheduler
|
|||||||
{
|
{
|
||||||
switch_context(old_thread, new_thread, regs);
|
switch_context(old_thread, new_thread, regs);
|
||||||
if (!old_thread->is_kernel) old_thread->fp_data.save();
|
if (!old_thread->is_kernel) old_thread->fp_data.save();
|
||||||
if (old_thread->is_kernel && MMU::get_page_directory() != MMU::kernel_page_directory())
|
if (MMU::get_page_directory() != MMU::kernel_page_directory())
|
||||||
old_thread->directory = MMU::get_page_directory();
|
old_thread->directory = MMU::get_page_directory();
|
||||||
if (new_thread->directory) MMU::switch_page_directory(new_thread->directory);
|
if (new_thread->directory) MMU::switch_page_directory(new_thread->directory);
|
||||||
if (!new_thread->is_kernel)
|
if (!new_thread->is_kernel)
|
||||||
|
Loading…
Reference in New Issue
Block a user