1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +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

@ -639,8 +639,8 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
{
ProtectedDataMutationScope scope { *this };
m_promises = m_execpromises;
m_has_promises = m_has_execpromises;
m_promises = m_execpromises.load();
m_has_promises = m_has_execpromises.load();
m_execpromises = 0;
m_has_execpromises = false;