/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | mount.rs | 104 fn is_mountpoint_root(&self) -> Result<bool, SystemError> { in is_mountpoint_root() 126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open() argument 130 fn close(&self, data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 140 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() 146 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate() argument 156 ) -> Result<usize, SystemError> { in read_at() 166 ) -> Result<usize, SystemError> { in write_at() 171 fn poll(&self) -> Result<super::PollStatus, SystemError> { in poll() 186 fn metadata(&self) -> Result<super::Metadata, SystemError> { in metadata() 191 fn set_metadata(&self, metadata: &super::Metadata) -> Result<(), SystemError> { in set_metadata() argument [all …]
|
D | mod.rs | 93 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument 102 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 122 ) -> Result<usize, SystemError>; in read_at() 139 ) -> Result<usize, SystemError>; in write_at() 144 fn poll(&self) -> Result<PollStatus, SystemError>; in poll() 150 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 159 fn set_metadata(&self, _metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument 171 fn resize(&self, _len: usize) -> Result<(), SystemError> { in resize() argument 189 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() 209 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() [all …]
|
D | file.rs | 106 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new() 128 pub fn read(&mut self, len: usize, buf: &mut [u8]) -> Result<usize, SystemError> { in read() 155 pub fn write(&mut self, len: usize, buf: &[u8]) -> Result<usize, SystemError> { in write() 175 pub fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 180 pub fn get_entry_name(&self, ino: usize) -> Result<String, SystemError> { in get_entry_name() 187 pub fn lseek(&mut self, origin: SeekFrom) -> Result<usize, SystemError> { in lseek() 223 pub fn readable(&self) -> Result<(), SystemError> { in readable() argument 234 pub fn writeable(&self) -> Result<(), SystemError> { in writeable() argument 245 pub fn readdir(&mut self, dirent: &mut Dirent) -> Result<u64, SystemError> { in readdir() 340 pub fn set_mode(&mut self, mode: FileMode) -> Result<(), SystemError> { in set_mode() argument [all …]
|
/DragonOS-0.1.8/kernel/src/process/ |
D | syscall.rs | 15 pub fn fork(&self) -> Result<usize, SystemError> { in fork() 21 pub fn vfork(&self) -> Result<usize, SystemError> { in vfork() 31 ) -> Result<usize, SystemError> { in execve() 41 ) -> Result<usize, SystemError> { in wait4() 62 pub fn getpid() -> Result<usize, SystemError> { in getpid()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | vec_cursor.rs | 45 pub fn read_u8(&mut self) -> Result<u8, SystemError> { in read_u8() 54 pub fn read_u16(&mut self) -> Result<u16, SystemError> { in read_u16() 68 pub fn read_u32(&mut self) -> Result<u32, SystemError> { in read_u32() 82 pub fn read_u64(&mut self) -> Result<u64, SystemError> { in read_u64() 101 pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), SystemError> { in read_exact() argument 113 pub fn read_u16_into(&mut self, buf: &mut [u16]) -> Result<(), SystemError> { in read_u16_into() argument 131 pub fn seek(&mut self, origin: SeekFrom) -> Result<usize, SystemError> { in seek() 157 pub fn write_u8(&mut self, value: u8) -> Result<u8, SystemError> { in write_u8() 169 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16() 183 pub fn write_u32(&mut self, value: u32) -> Result<u32, SystemError> { in write_u32() [all …]
|
D | notifier.rs | 32 ) -> Result<(), SystemError> { in register() argument 64 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() argument 106 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() argument 114 ) -> Result<(), SystemError> { in register_unique_prio() argument 119 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() argument 144 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() argument 152 ) -> Result<(), SystemError> { in register_unique_prio() argument 157 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() argument 181 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() argument 185 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() argument
|
D | lockref.rs | 50 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop() 120 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop() 144 pub fn inc_not_zero(&mut self) -> Result<i32, SystemError> { in inc_not_zero() 172 pub fn inc_not_dead(&mut self) -> Result<i32, SystemError> { in inc_not_dead() 202 pub fn dec(&mut self) -> Result<i32, SystemError> { in dec() 209 let retval: Result<i32, SystemError>; in dec() 234 pub fn dec_return(&mut self) -> Result<i32, SystemError> { in dec_return() 262 pub fn dec_not_zero(&mut self) -> Result<i32, SystemError> { in dec_not_zero() 272 let retval: Result<i32, SystemError>; in dec_not_zero() 293 pub fn dec_or_lock_not_zero(&mut self) -> Result<i32, SystemError> { in dec_or_lock_not_zero() [all …]
|
/DragonOS-0.1.8/kernel/src/net/ |
D | mod.rs | 43 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() 72 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint); in read() 80 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError>; in write() 92 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError>; in connect() argument 101 fn bind(&mut self, _endpoint: Endpoint) -> Result<(), SystemError> { in bind() argument 112 fn shutdown(&self, _type: ShutdownType) -> Result<(), SystemError> { in shutdown() argument 121 fn listen(&mut self, _backlog: usize) -> Result<(), SystemError> { in listen() argument 130 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() 177 ) -> Result<usize, SystemError> { in ioctl() 182 fn metadata(&self) -> Result<SocketMetadata, SystemError>; in metadata() [all …]
|
D | socket.rs | 51 pub fn get_ephemeral_port(&self, socket_type: SocketType) -> Result<u16, SystemError> { in get_ephemeral_port() 96 ) -> Result<(), SystemError> { in get_port() argument 113 pub fn unbind_port(&self, socket_type: SocketType, port: u16) -> Result<(), SystemError> { in unbind_port() argument 283 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() 314 fn write(&self, buf: &[u8], to: Option<super::Endpoint>) -> Result<usize, SystemError> { in write() 391 fn connect(&mut self, _endpoint: super::Endpoint) -> Result<(), SystemError> { in connect() argument 395 fn metadata(&self) -> Result<SocketMetadata, SystemError> { in metadata() 458 fn do_bind(&self, socket: &mut udp::Socket, endpoint: Endpoint) -> Result<(), SystemError> { in do_bind() argument 481 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() 507 fn write(&self, buf: &[u8], to: Option<super::Endpoint>) -> Result<usize, SystemError> { in write() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | tty_device.rs | 63 ) -> Result<&'a mut TtyFilePrivateData, SystemError> { in verify_file_private_data() 78 pub fn check_rw_param(&self, len: usize, buf: &[u8]) -> Result<(), SystemError> { in check_rw_param() argument 86 pub fn input(&self, buf: &[u8]) -> Result<usize, SystemError> { in input() 87 let r: Result<usize, TtyError> = self.core.input(buf, false); in input() 120 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open() argument 148 ) -> Result<usize, SystemError> { in read_at() 159 let r: Result<usize, TtyError> = self.core.read_stdin(&mut buf[0..len], true); in read_at() 182 ) -> Result<usize, SystemError> { in write_at() 194 let r: Result<usize, TtyError> = if data.flags.contains(TtyFileFlag::STDOUT) { in write_at() 212 fn poll(&self) -> Result<crate::filesystem::vfs::PollStatus, SystemError> { in poll() [all …]
|
D | mod.rs | 105 pub fn input(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in input() 122 pub fn output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in output() 133 pub fn stdout(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stdout() 144 pub fn stderr(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in stderr() 155 pub fn read_stdin(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_stdin() 159 let val: Result<mpsc::RecvRef<u8>, TryRecvError> = self.stdin_rx.try_recv_ref(); in read_stdin() 199 fn write_stdin(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_stdin() 202 let r: Result<mpsc::SendRef<u8>, TrySendError> = self.stdin_tx.try_send_ref(); in write_stdin() 231 fn read_output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_output() 234 let val: Result<mpsc::RecvRef<u8>, TryRecvError> = self.output_rx.try_recv_ref(); in read_output() [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/devfs/ |
D | null_dev.rs | 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument 76 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 80 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 88 fn list(&self) -> Result<Vec<String>, SystemError> { in list() 92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument 104 fn poll(&self) -> Result<PollStatus, SystemError> { in poll() 115 ) -> Result<usize, SystemError> { in read_at() 126 ) -> Result<usize, SystemError> { in write_at()
|
D | zero_dev.rs | 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument 76 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 80 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 88 fn list(&self) -> Result<Vec<String>, SystemError> { in list() 92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument 104 fn poll(&self) -> Result<PollStatus, SystemError> { in poll() 115 ) -> Result<usize, SystemError> { in read_at() 134 ) -> Result<usize, SystemError> { in write_at()
|
D | mod.rs | 102 ) -> Result<(), SystemError> { in register_device() argument 153 ) -> Result<(), SystemError> { in unregister_device() argument 248 pub fn add_dir(&self, name: &str) -> Result<(), SystemError> { in add_dir() argument 265 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev() argument 276 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove() argument 295 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_create_with_data() 347 ) -> Result<(), SystemError> { in open() argument 351 fn close(&self, _data: &mut super::vfs::FilePrivateData) -> Result<(), SystemError> { in close() argument 361 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() 368 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | ahci_inode.rs | 78 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument 82 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 86 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 94 fn list(&self) -> Result<Vec<String>, SystemError> { in list() 98 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument 110 fn poll(&self) -> Result<PollStatus, SystemError> { in poll() 121 ) -> Result<usize, SystemError> { in read_at() 140 ) -> Result<usize, SystemError> { in write_at()
|
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/ |
D | class.rs | 10 pub fn sys_class_register(class_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_class_register() 25 pub fn sys_class_unregister(class_name: &str) -> Result<(), SystemError> { in sys_class_unregister() argument 44 ) -> Result<Arc<dyn IndexNode>, SystemError> { in class_device_register() 62 ) -> Result<(), SystemError> { in class_device_unregister() argument
|
D | bus.rs | 10 pub fn sys_bus_register(bus_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_bus_register() 25 pub fn sys_bus_unregister(bus_name: &str) -> Result<(), SystemError> { in sys_bus_unregister() argument 40 ) -> Result<(Arc<dyn IndexNode>, Arc<dyn IndexNode>), SystemError> { in sys_bus_init() 57 pub fn bus_driver_register(bus_name: &str, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in bus_driver_register() 76 pub fn bus_device_register(bus_name: &str, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in bus_device_register()
|
D | mod.rs | 160 ) -> Result<(), SystemError> { in open() argument 164 fn close(&self, _data: &mut super::vfs::FilePrivateData) -> Result<(), SystemError> { in close() argument 174 ) -> Result<usize, SystemError> { in read_at() 184 ) -> Result<usize, SystemError> { in write_at() 188 fn poll(&self) -> Result<super::vfs::PollStatus, SystemError> { in poll() 200 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 208 fn get_entry_name(&self, ino: super::vfs::InodeId) -> Result<String, SystemError> { in get_entry_name() 240 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 265 fn ioctl(&self, _cmd: u32, _data: usize) -> Result<usize, SystemError> { in ioctl() 269 fn list(&self) -> Result<Vec<String>, SystemError> { in list() [all …]
|
/DragonOS-0.1.8/kernel/src/time/ |
D | syscall.rs | 52 ) -> Result<usize, SystemError> { in nanosleep() 61 let r: Result<usize, SystemError> = nanosleep(slt_spec).map(|slt_spec| { in nanosleep() 75 pub fn clock() -> Result<usize, SystemError> { in clock() 82 ) -> Result<usize, SystemError> { in gettimeofday()
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 99 ) -> Result<usize, SystemError> { in read_at() 119 ) -> Result<usize, SystemError> { in write_at() 127 ) -> Result<(), SystemError> { in open() argument 141 ) -> Result<(), SystemError> { in close() argument 152 fn poll(&self) -> Result<PollStatus, SystemError> { in poll() 156 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() 160 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument 180 fn list(&self) -> Result<alloc::vec::Vec<alloc::string::String>, SystemError> { in list()
|
/DragonOS-0.1.8/kernel/src/driver/net/ |
D | mod.rs | 22 fn poll(&self, sockets: &mut iface::SocketSet) -> Result<(), SystemError>; in poll() argument 24 fn update_ip_addrs(&self, ip_addrs: &[wire::IpCidr]) -> Result<(), SystemError>; in update_ip_addrs() argument
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | user_access.rs | 24 pub unsafe fn clear_user(dest: VirtAddr, len: usize) -> Result<usize, SystemError> { in clear_user() 33 pub unsafe fn copy_to_user(dest: VirtAddr, src: &[u8]) -> Result<usize, SystemError> { in copy_to_user() 43 pub unsafe fn copy_from_user(dst: &mut [u8], src: VirtAddr) -> Result<usize, SystemError> { in copy_from_user() 72 ) -> Result<String, SystemError> { in check_and_clone_cstr() 111 pub fn check_and_clone_cstr_array(user: *const *const u8) -> Result<Vec<String>, SystemError> { in check_and_clone_cstr_array()
|
/DragonOS-0.1.8/docs/community/code_contribution/ |
D | rust-coding-style.md | 36 fn foo() -> Result<(), CustomErr> { 45 fn foo() -> Result<(), SystemError> { 86   如果函数的返回值是`Result`类型,那么返回值应当这样进行解释:
|
/DragonOS-0.1.8/docs/kernel/locking/ |
D | lockref.md | 62 - `pub fn inc_not_zero(&mut self) -> Result<i32, SystemError>` 63 - `pub fn inc_not_dead(&mut self) -> Result<i32, SystemError>` 102 - `pub fn dec(&mut self) -> Result<i32, SystemError>` 103 - `pub fn dec_return(&mut self) -> Result<i32, SystemError>` 104 - `pub fn dec_not_zero(&mut self) -> Result<i32, SystemError>` 105 - `pub fn dec_or_lock_not_zero(&mut self) -> Result<i32, SystemError>`
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 117 fn open_status(&self, pdata: &mut ProcfsFilePrivateData) -> Result<i64, SystemError> { in open_status() 203 ) -> Result<usize, SystemError> { in read_status() 283 pub fn register_pid(&self, pid: i64) -> Result<(), SystemError> { in register_pid() argument 305 pub fn unregister_pid(&self, pid: i64) -> Result<(), SystemError> { in unregister_pid() argument 324 fn open(&self, data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument 347 fn close(&self, data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument 371 ) -> Result<usize, SystemError> { in read_at() 418 ) -> Result<usize, SystemError> { in write_at() 422 fn poll(&self) -> Result<PollStatus, SystemError> { in poll() 442 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() [all …]
|