Kernel: Add a comment explaining an alternate path in Process::exec()

I had to look at this for a moment before I realized that sys$execve()
and the spawning of /bin/SystemServer at boot are taking two different
paths out of exec().

Add a comment to help the next person looking at it. :^)
This commit is contained in:
Andreas Kling 2021-09-07 01:32:54 +02:00
parent 5d06ab6531
commit fe2e25edad
Notes: sideshowbarker 2024-07-18 04:32:50 +09:00

View file

@ -848,6 +848,9 @@ KResult Process::exec(String path, Vector<String> arguments, Vector<String> envi
VERIFY_NOT_REACHED();
}
// NOTE: This code path is taken in the non-syscall case, i.e when the kernel spawns
// a userspace process directly (such as /bin/SystemServer on startup)
if (prev_flags & 0x200)
sti();
Processor::leave_critical();