mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Kernel: Add interrupt related functions to Processor class
This adds {enable, disable}_interrupts() and are_interrupts_enabled() to the Processor class, and also implements them for x86(_64) and aarch64.
This commit is contained in:
parent
80be5f8044
commit
9413fe9fe5
2 changed files with 32 additions and 0 deletions
|
@ -422,6 +422,21 @@ public:
|
|||
return m_features.has_flag(feature);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static bool are_interrupts_enabled()
|
||||
{
|
||||
return Kernel::are_interrupts_enabled();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static void enable_interrupts()
|
||||
{
|
||||
sti();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static void disable_interrupts()
|
||||
{
|
||||
cli();
|
||||
}
|
||||
|
||||
void check_invoke_scheduler();
|
||||
void invoke_scheduler_async() { m_invoke_scheduler_async = true; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue