| 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){ |
no test coverage detected