Home
last modified time | relevance | path

Searched refs:alloc_fd (Results 1 – 4 of 4) sorted by relevance

/DragonOS-0.1.8/kernel/src/process/
Dprocess.rs189 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() method
369 assert_eq!(current_pcb().alloc_fd(stdin, None).unwrap(), 0); in init_stdio()
370 assert_eq!(current_pcb().alloc_fd(stdout, None).unwrap(), 1); in init_stdio()
371 assert_eq!(current_pcb().alloc_fd(stderr, None).unwrap(), 2); in init_stdio()
/DragonOS-0.1.8/kernel/src/ipc/
Dsyscall.rs35 let read_fd = current_pcb().alloc_fd(read_file, None)?; in pipe()
36 let write_fd = current_pcb().alloc_fd(write_file, None)?; in pipe()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs184 let r = current_pcb().alloc_fd(file, None).map(|fd| fd as usize); in open()
387 let res = current_pcb().alloc_fd(*file_cp, None).map(|x| x as usize); in dup()
438 .alloc_fd(*file_cp.unwrap(), Some(newfd)) in dup2()
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs62 let fd = current_pcb().alloc_fd(f, None).map(|x| x as usize); in socket()
343 let new_fd = current_pcb().alloc_fd(File::new(new_socket, FileMode::O_RDWR)?, None)?; in accept()