mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:18:14 +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
|
@ -980,15 +980,8 @@ ErrorOr<FlatPtr> Process::sys$execve(Userspace<Syscall::SC_execve_params const*>
|
|||
VERIFY(Processor::in_critical() == 1);
|
||||
g_scheduler_lock.lock();
|
||||
current_thread->set_state(Thread::State::Running);
|
||||
#if ARCH(X86_64)
|
||||
FlatPtr prev_flags = previous_interrupts_state == InterruptsState::Enabled ? 0x200 : 0;
|
||||
Processor::assume_context(*current_thread, prev_flags);
|
||||
Processor::assume_context(*current_thread, previous_interrupts_state);
|
||||
VERIFY_NOT_REACHED();
|
||||
#elif ARCH(AARCH64)
|
||||
TODO_AARCH64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
}
|
||||
|
||||
// NOTE: This code path is taken in the non-syscall case, i.e when the kernel spawns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue