Home
last modified time | relevance | path

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

/DragonOS-0.1.8/kernel/src/process/
Dprocess.rs124 if self.fds != null_mut() { in init_files()
130 self.fds = fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in init_files()
149 self.fds = null_mut(); in copy_files()
164 self.fds = new_fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in copy_files()
171 if self.fds.is_null() { in exit_files()
176 unsafe { Box::from_raw(self.fds as *mut FileDescriptorVec) }; in exit_files()
178 self.fds = null_mut(); in exit_files()
191 let fds: &mut FileDescriptorVec = in alloc_fd() localVariable
209 let x = &mut fds.fds[new_fd as usize]; in alloc_fd()
219 for x in fds.fds.iter_mut() { in alloc_fd()
[all …]
Dproc-types.h111 void *fds; member
Dprocess.c59 ….virtual_runtime = 0, .fds = {0}, .next_pcb = &proc, .prev_pcb = &proc, .parent_pcb = &proc, .exit…
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs378 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in dup()
382 if let Some(file) = &fds.fds[oldfd as usize] { in dup()
413 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in dup2()
422 if let Some(file) = &fds.fds[oldfd as usize] { in dup2()
423 if fds.fds[newfd as usize].is_some() { in dup2()
467 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in fcntl()
468 if fds.fds[i as usize].is_none() { in fcntl()
478 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in fcntl()
480 if let Some(file) = &fds.fds[fd as usize] { in fcntl()
492 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in fcntl()
[all …]
Dfile.rs385 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD], field
406 return Box::new(FileDescriptorVec { fds: data }); in new()
415 if let Some(file) = &self.fds[i] { in clone()
416 res.fds[i] = file.try_clone(); in clone()
425 return unsafe { (pcb.fds as usize as *mut FileDescriptorVec).as_mut() }; in from_pcb()