1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

Kernel: Make Process's m_promises & m_execpromises fields atomic

This is essentially free on x86 and allows us to not hold the big
process lock just to check the required promises for a syscall.
This commit is contained in:
Idan Horowitz 2021-08-06 15:12:33 +03:00 committed by Andreas Kling
parent 868be680c2
commit c3f668a758
4 changed files with 12 additions and 12 deletions

View file

@ -74,13 +74,13 @@ KResultOr<FlatPtr> Process::sys$pledge(Userspace<const Syscall::SC_pledge_params
// leave the caller in an unexpected state.
if (promises) {
m_has_promises = true;
m_promises = new_promises;
m_has_promises = true;
}
if (execpromises) {
m_has_execpromises = true;
m_execpromises = new_execpromises;
m_has_execpromises = true;
}
return 0;