mirror of
https://github.com/RGBCube/serenity
synced 2025-06-12 12:52:06 +00:00

This matches x86_64's behaviour in common_trap_exit. (called from thread_context_first_enter) Currently thread_context_first_enter is only called when creating new processes from scratch, in which case this doesn't change the actual behaviour. But once thread_context_first_enter is called as part of execve support, this will ensure the Thread's m_current_trap is set correctly to the new trap frame.
18 lines
357 B
C++
18 lines
357 B
C++
/*
|
|
* Copyright (c) 2023, Idan Horowitz <idan.horowitz@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <Kernel/Arch/Processor.h>
|
|
#include <Kernel/Arch/aarch64/TrapFrame.h>
|
|
#include <Kernel/InterruptDisabler.h>
|
|
|
|
namespace Kernel {
|
|
|
|
extern "C" void exit_trap(TrapFrame* trap)
|
|
{
|
|
return Processor::current().exit_trap(*trap);
|
|
}
|
|
|
|
}
|