mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 22:42:52 +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
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/FireFox317
Commit: fb10774862
Pull-request: https://github.com/SerenityOS/serenity/pull/16911
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/nico ✅
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