浏览代码

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 年之前
父节点
当前提交
fe2e25edad
共有 1 个文件被更改,包括 3 次插入0 次删除
  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();
         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)
     if (prev_flags & 0x200)
         sti();
         sti();
     Processor::leave_critical();
     Processor::leave_critical();