Unverified Commit 77780aac authored by PhoeniX's avatar PhoeniX

pid numeration fix

parent 3695cd7d
......@@ -108,7 +108,7 @@ uint64_t ProcessManager::RegisterProcess(Process *process) {
Mutex::CriticalLock lock(processSwitchMutex);
uint64_t pid = 1;
for (size_t i = 0; i < processes.getCount(); i++) {
pid = klib::max(pid, processes[i]->getId());
pid = klib::max(pid, processes[i]->getId() + 1);
}
processes.add(process);
return pid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment