mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:08:12 +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:
parent
247109cee6
commit
fb10774862
11 changed files with 53 additions and 29 deletions
|
@ -14,7 +14,7 @@ namespace Kernel {
|
|||
void Process::sys$exit(int status)
|
||||
{
|
||||
// FIXME: We have callers from kernel which don't acquire the big process lock.
|
||||
if (Thread::current()->previous_mode() == Thread::PreviousMode::UserMode) {
|
||||
if (Thread::current()->previous_mode() == ExecutionMode::User) {
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue