Home
last modified time | relevance | path

Searched refs:fds (Results 1 – 5 of 5) sorted by relevance

/DragonOS-0.1.7/kernel/src/process/
Dprocess.rs122 if self.fds != null_mut() { in init_files()
128 self.fds = fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in init_files()
147 self.fds = null_mut(); in copy_files()
162 self.fds = new_fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in copy_files()
169 if self.fds.is_null() { in exit_files()
174 unsafe { Box::from_raw(self.fds as *mut FileDescriptorVec) }; in exit_files()
176 self.fds = null_mut(); in exit_files()
189 let fds: &mut FileDescriptorVec = in alloc_fd() localVariable
207 let x = &mut fds.fds[new_fd as usize]; in alloc_fd()
217 for x in fds.fds.iter_mut() { in alloc_fd()
[all …]
Dproc-types.h114 void * fds; member
Dprocess.c58 ….virtual_runtime = 0, .fds = {0}, .next_pcb = &proc, .prev_pcb = &proc, .parent_pcb = &proc, .exit…
/DragonOS-0.1.7/kernel/src/filesystem/vfs/
Dfile.rs320 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD], field
341 return Box::new(FileDescriptorVec { fds: data }); in new()
350 if let Some(file) = &self.fds[i] { in clone()
351 res.fds[i] = file.try_clone(); in clone()
360 return unsafe { (pcb.fds as usize as *mut FileDescriptorVec).as_mut() }; in from_pcb()
Dsyscall.rs352 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in do_dup()
356 if let Some(file) = &fds.fds[oldfd as usize] { in do_dup()
388 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in do_dup2()
397 if let Some(file) = &fds.fds[oldfd as usize] { in do_dup2()
398 if fds.fds[newfd as usize].is_some() { in do_dup2()