2021-06-21 15:34:09 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2021-10-13 23:07:37 +00:00
|
|
|
#include <Kernel/Arch/Processor.h>
|
2022-10-04 10:46:11 +00:00
|
|
|
#include <Kernel/Arch/x86_64/TrapFrame.h>
|
2022-10-05 17:27:36 +00:00
|
|
|
#include <Kernel/InterruptDisabler.h>
|
2021-06-21 15:34:09 +00:00
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
extern "C" void enter_trap_no_irq(TrapFrame* trap)
|
|
|
|
{
|
|
|
|
InterruptDisabler disable;
|
|
|
|
Processor::current().enter_trap(*trap, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void enter_trap(TrapFrame* trap)
|
|
|
|
{
|
|
|
|
InterruptDisabler disable;
|
|
|
|
Processor::current().enter_trap(*trap, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void exit_trap(TrapFrame* trap)
|
|
|
|
{
|
|
|
|
InterruptDisabler disable;
|
|
|
|
return Processor::current().exit_trap(*trap);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|