Ver código fonte

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. :^)
Andreas Kling 3 anos atrás
pai
commit
fe2e25edad
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      Kernel/Syscalls/execve.cpp

+ 3 - 0
Kernel/Syscalls/execve.cpp

@@ -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();