mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-11 05:24:44 -04:00
Cleanup
This commit is contained in:
parent
04468b9f0b
commit
276b83ee1a
@ -815,11 +815,15 @@ size_t scheduler::register_new_handle(const std::string& path){
|
||||
}
|
||||
|
||||
void scheduler::release_handle(size_t fd){
|
||||
pcb[current_pid].handles[fd] = nullptr;
|
||||
pcb[current_pid].handles[fd].clear();
|
||||
}
|
||||
|
||||
bool scheduler::has_handle(size_t fd){
|
||||
return pcb[current_pid].handles.size() - 1 <= fd;
|
||||
if(fd < pcb[current_pid].handles.size()){
|
||||
return pcb[current_pid].handles[fd].empty();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& scheduler::get_handle(size_t fd){
|
||||
|
Loading…
x
Reference in New Issue
Block a user