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

Function SysExit

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

Source from the content-addressed store, hash-verified

123typedef long(*syscall_t)(regs64_t*);
124
125long SysExit(regs64_t* r){
126 int64_t code = SC_ARG0(r);
127
128 Log::Info("Process %s (PID: %d) exiting with code %d", Scheduler::GetCurrentProcess()->name, Scheduler::GetCurrentProcess()->pid, code);
129
130 Scheduler::EndProcess(Scheduler::GetCurrentProcess());
131 return 0;
132}
133
134long SysExec(regs64_t* r){
135 process_t* currentProcess = Scheduler::GetCurrentProcess();

Callers

nothing calls this directly

Calls 3

InfoFunction · 0.85
GetCurrentProcessFunction · 0.85
EndProcessFunction · 0.85

Tested by

no test coverage detected