Searched refs:FileDescriptorVec (Results 1 – 3 of 3) sorted by relevance
12 file::{File, FileDescriptorVec, FileMode},129 let fd_vec: &mut FileDescriptorVec = Box::leak(FileDescriptorVec::new()); in init_files()130 self.fds = fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in init_files()154 let old_fds: &mut FileDescriptorVec = if let Some(o_fds) = FileDescriptorVec::from_pcb(from) in copy_files()162 let new_fd_vec: &mut FileDescriptorVec = Box::leak(old_fds.clone()); in copy_files()164 self.fds = new_fd_vec as *mut FileDescriptorVec as usize as *mut c_void; in copy_files()175 let old_fds: Box<FileDescriptorVec> = in exit_files()176 unsafe { Box::from_raw(self.fds as *mut FileDescriptorVec) }; in exit_files()191 let fds: &mut FileDescriptorVec = in alloc_fd()192 if let Some(f) = FileDescriptorVec::from_pcb(current_pcb()) { in alloc_fd()[all …]
383 pub struct FileDescriptorVec { struct385 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD], argument388 impl FileDescriptorVec { implementation391 pub fn new() -> Box<FileDescriptorVec> { in new()393 let mut data: [MaybeUninit<Option<Box<File>>>; FileDescriptorVec::PROCESS_MAX_FD] = in new()397 for i in 0..FileDescriptorVec::PROCESS_MAX_FD { in new()401 let data: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD] = unsafe { in new()402 core::mem::transmute::<_, [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD]>(data) in new()406 return Box::new(FileDescriptorVec { fds: data }); in new()412 pub fn clone(&self) -> Box<FileDescriptorVec> { in clone() argument[all …]
5 filesystem::vfs::file::FileDescriptorVec,378 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in dup()381 if FileDescriptorVec::validate_fd(oldfd) { in dup()413 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in dup2()415 if FileDescriptorVec::validate_fd(oldfd) && FileDescriptorVec::validate_fd(newfd) { in dup2()462 if arg < 0 || arg as usize >= FileDescriptorVec::PROCESS_MAX_FD { in fcntl()466 for i in arg..FileDescriptorVec::PROCESS_MAX_FD { in fcntl()467 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in fcntl()478 if let Some(fds) = FileDescriptorVec::from_pcb(current_pcb()) { in fcntl()479 if FileDescriptorVec::validate_fd(fd) { in fcntl()[all …]