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

Function FindHandle

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

Source from the content-addressed store, hash-verified

109 }
110
111 long FindHandle(process_t* proc, handle_id_t id, Handle** handle){
112 if(id < 1 || id - 1 > static_cast<handle_id_t>(proc->handles.get_length())){
113 return 1;
114 }
115
116 *handle = &proc->handles[id - 1]; // Handle IDs start at 1
117
118 if(!(*handle)->ko.get()) return 2;
119
120 return 0;
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())){

Callers 9

SysCreateInterfaceFunction · 0.85
SysInterfaceAcceptFunction · 0.85
SysEndpointQueueFunction · 0.85
SysEndpointDequeueFunction · 0.85
SysEndpointCallFunction · 0.85
SysEndpointInfoFunction · 0.85
SysKernelObjectWaitOneFunction · 0.85
SysKernelObjectWaitFunction · 0.85
SysKernelObjectDestroyFunction · 0.85

Calls 2

get_lengthMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected