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

Function SysWaitPID

Kernel/src/arch/x86_64/syscalls.cpp:933–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933long SysWaitPID(regs64_t* r){
934 uint64_t pid = SC_ARG0(r);
935
936 lock_t unused = 0;
937 process_t* proc = nullptr;
938
939 if((proc = Scheduler::FindProcessByPID(pid))){
940 Scheduler::BlockCurrentThread(proc->blocking, unused);
941 }
942
943 if((proc = Scheduler::FindProcessByPID(pid))) {
944 return -1;
945 }
946
947 return 0;
948}
949
950long SysNanoSleep(regs64_t* r){
951 uint64_t nanoseconds = SC_ARG0(r);

Callers

nothing calls this directly

Calls 2

FindProcessByPIDFunction · 0.85
BlockCurrentThreadFunction · 0.85

Tested by

no test coverage detected