MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / GetNextProccessPID

Function GetNextProccessPID

Kernel/src/arch/x86_64/scheduler.cpp:141–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 uint64_t GetNextProccessPID(uint64_t pid){
142 uint64_t newPID = UINT64_MAX;
143 for(process_t* proc : *processes){
144 if(proc->pid > pid && proc->pid < newPID){
145 newPID = proc->pid;
146 }
147 }
148
149 if(newPID == UINT64_MAX){
150 return 0;
151 }
152
153 return newPID;
154 }
155
156 process_t* InitializeProcessStructure(){
157 // Create process structure

Callers 1

SysGetNextProcessInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected