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

Function GetCurrentProcess

Kernel/include/arch/x86_64/scheduler.h:80–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 process_t* CreateELFProcess(void* elf, int argc = 0, char** argv = nullptr, int envc = 0, char** envp = nullptr);
79
80 inline static process_t* GetCurrentProcess(){
81 asm("cli");
82 CPU* cpu = GetCPULocal();
83
84 process_t* ret = nullptr;
85
86 if(cpu->currentThread)
87 ret = cpu->currentThread->parent;
88
89 asm("sti");
90 return ret;
91 }
92
93 Handle& RegisterHandle(process_t* proc, FancyRefPtr<KernelObject> ko);
94 long FindHandle(process_t* proc, handle_id_t id, Handle** ref);

Callers 15

KernelProcessFunction · 0.85
isr_handlerFunction · 0.85
LoadELFSegmentsFunction · 0.85
CreateELFProcessFunction · 0.85
SysExitFunction · 0.85
SysExecFunction · 0.85
SysReadFunction · 0.85
SysWriteFunction · 0.85
SysOpenFunction · 0.85
SysCloseFunction · 0.85
SysLinkFunction · 0.85
SysUnlinkFunction · 0.85

Calls 1

GetCPULocalFunction · 0.85

Tested by

no test coverage detected