mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 01:15:08 +00:00

The platform independent Processor.h file includes the shared processor code and includes the specific platform header file. All references to the Arch/x86/Processor.h file have been replaced with a reference to Arch/Processor.h.
31 lines
658 B
C++
31 lines
658 B
C++
/*
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <Kernel/Arch/Processor.h>
|
|
#include <Kernel/Arch/x86/InterruptDisabler.h>
|
|
#include <Kernel/Arch/x86/TrapFrame.h>
|
|
|
|
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);
|
|
}
|
|
|
|
}
|