mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
interrupt: interrupt_set()
This commit is contained in:
@@ -47,3 +47,16 @@ void interrupt_raiseipl(long newipl) {
|
||||
void interrupt_loweripl(long newipl) {
|
||||
__assert(!"Unimplemented");
|
||||
}
|
||||
|
||||
void arch_interrupt_disable();
|
||||
void arch_interrupt_enable();
|
||||
|
||||
bool interrupt_set(bool status) {
|
||||
if (status)
|
||||
arch_interrupt_enable();
|
||||
else
|
||||
arch_interrupt_disable();
|
||||
bool old = _cpu()->intstatus;
|
||||
_cpu()->intstatus = status;
|
||||
return old;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user