mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
interrupt: default interrupts being off in isr
This commit is contained in:
@@ -11,14 +11,10 @@ void interrupt_isr(int vec, context_t *ctx) {
|
|||||||
|
|
||||||
if (_cpu()->ipl > isr->priority) {
|
if (_cpu()->ipl > isr->priority) {
|
||||||
long oldipl = interrupt_setipl(isr->priority);
|
long oldipl = interrupt_setipl(isr->priority);
|
||||||
|
bool oldint = _cpu()->intstatus;
|
||||||
bool oldint = interrupt_set(true);
|
|
||||||
isr->func(isr, ctx);
|
isr->func(isr, ctx);
|
||||||
interrupt_set(false);
|
|
||||||
|
|
||||||
interrupt_setipl(oldipl);
|
|
||||||
// restore status on cpu_t struct directly
|
|
||||||
_cpu()->intstatus = oldint;
|
_cpu()->intstatus = oldint;
|
||||||
|
interrupt_setipl(oldipl);
|
||||||
} else {
|
} else {
|
||||||
isr->pending = true;
|
isr->pending = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user