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

Function DestroyHandle

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

Source from the content-addressed store, hash-verified

121 }
122
123 long DestroyHandle(process_t* proc, handle_id_t id){
124 if(id < 1 || id - 1 > static_cast<handle_id_t>(proc->handles.get_length())){
125 return 1;
126 }
127
128 proc->handles[id - 1] = {0, FancyRefPtr<KernelObject>(nullptr)}; // Handle IDs start at 1
129
130 return 0;
131 }
132
133 process_t* FindProcessByPID(uint64_t pid){
134 for(process_t* proc : *processes){

Callers 1

SysKernelObjectDestroyFunction · 0.85

Calls 1

get_lengthMethod · 0.45

Tested by

no test coverage detected