mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
Kernel: Abstract Processor::assume_context flags using InterruptsState
The details of the specific interrupt bits that must be turned on are irrelevant to the sys$execve implementation. Abstract it away to the Processor implementations using the InterruptsState enum.
This commit is contained in:
parent
6ad8f4bb11
commit
a349570a04
5 changed files with 9 additions and 13 deletions
|
@ -1569,7 +1569,7 @@ extern "C" FlatPtr do_init_context(Thread* thread, u32 flags)
|
|||
return Processor::current().init_context(*thread, true);
|
||||
}
|
||||
|
||||
void Processor::assume_context(Thread& thread, FlatPtr flags)
|
||||
void Processor::assume_context(Thread& thread, InterruptsState new_interrupts_state)
|
||||
{
|
||||
dbgln_if(CONTEXT_SWITCH_DEBUG, "Assume context for thread {} {}", VirtualAddress(&thread), thread);
|
||||
|
||||
|
@ -1579,6 +1579,7 @@ void Processor::assume_context(Thread& thread, FlatPtr flags)
|
|||
// and then the scheduler lock
|
||||
VERIFY(Processor::in_critical() == 2);
|
||||
|
||||
u32 flags = 2 | (new_interrupts_state == InterruptsState::Enabled ? 0x200 : 0);
|
||||
do_assume_context(&thread, flags);
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue