Interrupts: ensure is_in_handler is true if we know we are in a handler
This commit is contained in:
parent
4401b31440
commit
ee49caa6d3
@ -7,5 +7,6 @@ namespace Interrupts
|
|||||||
void disable();
|
void disable();
|
||||||
|
|
||||||
bool is_in_handler();
|
bool is_in_handler();
|
||||||
|
void ensure_handler();
|
||||||
void return_from_handler(Context* context);
|
void return_from_handler(Context* context);
|
||||||
}
|
}
|
@ -16,6 +16,11 @@ bool Interrupts::is_in_handler()
|
|||||||
return __is_in_interrupt_handler;
|
return __is_in_interrupt_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Interrupts::ensure_handler()
|
||||||
|
{
|
||||||
|
__is_in_interrupt_handler = true;
|
||||||
|
}
|
||||||
|
|
||||||
void Interrupts::return_from_handler(Context* context)
|
void Interrupts::return_from_handler(Context* context)
|
||||||
{
|
{
|
||||||
asm volatile("mov %0, %%rsp\n"
|
asm volatile("mov %0, %%rsp\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user