1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 10:14:58 +00:00

Kernel: Factor our PreviousMode into RegisterState::previous_mode

Various places in the kernel were manually checking the cs register for
x86_64, however to share this with aarch64 a function in RegisterState
is added, and the call-sites are updated. While we're here the
PreviousMode enum is renamed to ExecutionMode.
This commit is contained in:
Timon Kruiper 2023-01-08 16:16:08 +01:00 committed by Andreas Kling
parent 247109cee6
commit fb10774862
11 changed files with 53 additions and 29 deletions

View file

@ -631,7 +631,7 @@ void Thread::update_time_scheduled(u64 current_scheduler_time, bool is_kernel, b
bool Thread::tick()
{
if (previous_mode() == PreviousMode::KernelMode) {
if (previous_mode() == ExecutionMode::Kernel) {
++m_process->m_ticks_in_kernel;
++m_ticks_in_kernel;
} else {