/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() 11 let binding: Arc<dyn IndexNode> = SYS_CLASS_INODE(); in sys_class_register() 26 let binding: Arc<dyn IndexNode> = SYS_CLASS_INODE(); in sys_class_unregister() 42 class: Arc<dyn IndexNode>, in class_device_register() 44 ) -> Result<Arc<dyn IndexNode>, SystemError> { in class_device_register() 60 class: Arc<dyn IndexNode>, in class_device_unregister()
|
D | bus.rs | 10 pub fn sys_bus_register(bus_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_bus_register() 11 let binding: Arc<dyn IndexNode> = SYS_BUS_INODE(); in sys_bus_register() 26 let binding: Arc<dyn IndexNode> = SYS_BUS_INODE(); in sys_bus_unregister() 39 inode: &Arc<dyn IndexNode>, in sys_bus_init() 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 | devices.rs | 10 pub fn sys_device_register(device_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_device_register() 11 let binding: Arc<dyn IndexNode> = SYS_DEVICES_INODE(); in sys_device_register() 26 let binding: Arc<dyn IndexNode> = SYS_DEVICES_INODE(); in sys_device_unregister()
|
D | fs.rs | 10 pub fn fs_register(fs_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in fs_register() 11 let binding: Arc<dyn IndexNode> = SYS_FS_INODE(); in fs_register() 26 let binding: Arc<dyn IndexNode> = SYS_FS_INODE(); in fs_unregister()
|
D | mod.rs | 26 static mut __SYS_DEVICES_INODE: *mut Arc<dyn IndexNode> = null_mut(); 27 static mut __SYS_BUS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 28 static mut __SYS_CLASS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 29 static mut __SYS_FS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 34 pub fn SYS_DEVICES_INODE() -> Arc<dyn IndexNode> { in SYS_DEVICES_INODE() 43 pub fn SYS_BUS_INODE() -> Arc<dyn IndexNode> { in SYS_BUS_INODE() 52 pub fn SYS_CLASS_INODE() -> Arc<dyn IndexNode> { in SYS_CLASS_INODE() 61 pub fn SYS_FS_INODE() -> Arc<dyn IndexNode> { in SYS_FS_INODE() 75 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 79 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/base/device/ |
D | driver.rs | 32 fn as_any_ref(&'static self) -> &'static dyn core::any::Any; in as_any_ref() 42 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>); in set_sys_info() 47 fn sys_info(&self) -> Option<Arc<dyn IndexNode>>; in sys_info() 69 pub fn add_driver(&self, id_table: IdTable, drv: Arc<dyn Driver>) { in add_driver() 89 pub fn get_driver(&self, id_table: &IdTable) -> Option<Arc<dyn Driver>> { in get_driver() 99 fn get_sys_info(&self) -> Option<Arc<dyn IndexNode>> { in get_sys_info() 107 drivers: BTreeMap<IdTable, Arc<dyn Driver>>, // 所有驱动 108 sys_info: Option<Arc<dyn IndexNode>>, // sys information
|
D | bus.rs | 79 buses: BTreeMap<IdTable, Arc<dyn Bus>>, // 总线设备表 80 bus_drvs: BTreeMap<IdTable, Arc<dyn BusDriver>>, // 总线驱动表 81 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode 108 pub fn add_bus(&self, id_table: IdTable, bus_dev: Arc<dyn Bus>) { in add_bus() 119 pub fn add_driver(&self, id_table: IdTable, bus_drv: Arc<dyn BusDriver>) { in add_driver() 149 pub fn get_bus(&self, id_table: &IdTable) -> Option<Arc<dyn Bus>> { in get_bus() 159 pub fn get_driver(&self, id_table: &IdTable) -> Option<Arc<dyn BusDriver>> { in get_driver() 169 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info()
|
D | mod.rs | 174 fn as_any_ref(&'static self) -> &'static dyn core::any::Any; in as_any_ref() 189 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>); in set_sys_info() 194 fn sys_info(&self) -> Option<Arc<dyn IndexNode>>; in sys_info() 212 pub fn add_device(&self, id_table: IdTable, dev: Arc<dyn Device>) { in add_device() 232 pub fn get_device(&self, id_table: &IdTable) -> Option<Arc<dyn Device>> { in get_device() 242 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() 250 devices: BTreeMap<IdTable, Arc<dyn Device>>, // 所有设备 251 sys_info: Option<Arc<dyn IndexNode>>, // sys information
|
/DragonOS-0.1.8/kernel/src/driver/base/platform/ |
D | mod.rs | 77 fn get_device(&self, id_table: &IdTable) -> Option<Arc<dyn PlatformDevice>> { in get_device() 87 fn get_driver(&self, id_table: &IdTable) -> Option<Arc<dyn PlatformDriver>> { in get_driver() 96 fn register_platform_driver(&self, driver: Arc<dyn PlatformDriver>) -> Result<(), DeviceError> { in register_platform_driver() 114 fn unregister_platform_driver(&mut self, driver: Arc<dyn PlatformDriver>) { in unregister_platform_driver() 125 device: Arc<dyn PlatformDevice>, in register_platform_device() 143 fn unregister_platform_device(&mut self, device: Arc<dyn PlatformDevice>) { in unregister_platform_device() 152 fn driver_match_device(&self, driver: Arc<dyn PlatformDriver>) -> Result<i32, DeviceError> { in driver_match_device() 185 fn device_match_driver(&self, device: Arc<dyn PlatformDevice>) -> Result<(), DeviceError> { in device_match_driver() 209 drivers: BTreeMap<IdTable, Arc<dyn PlatformDriver>>, // 总线上所有驱动 210 devices: BTreeMap<IdTable, Arc<dyn PlatformDevice>>, // 总线上所有设备 [all …]
|
D | platform_driver.rs | 14 fn probe(&self, device: Arc<dyn PlatformDevice>) -> Result<(), DriverError>; in probe()
|
D | platform_device.rs | 29 fn set_driver(&self, driver: Option<Arc<dyn PlatformDriver>>); in set_driver()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | notifier.rs | 19 struct NotifierChain<T>(Vec<Arc<dyn NotifierBlock<T>>>); 30 block: Arc<dyn NotifierBlock<T>>, in register() 64 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() 106 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() 113 block: Arc<dyn NotifierBlock<T>>, in register_unique_prio() 119 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() 144 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() 151 block: Arc<dyn NotifierBlock<T>>, in register_unique_prio() 157 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() 181 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() [all …]
|
D | casting.rs | 58 fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any>; in as_any_arc() 66 let x: Arc<dyn Any> = self.as_any_arc(); in downcast_arc()
|
/DragonOS-0.1.8/docs/kernel/filesystem/ |
D | sysfs.md | 38 devices: BTreeMap<IdTable, Arc<dyn Device>>, // 所有设备 39 sys_info: Option<Arc<dyn IndexNode>>, // sys information 56 drivers: BTreeMap<IdTable, Arc<dyn Driver>>, // 所有驱动 57 sys_info: Option<Arc<dyn IndexNode>>, // sys information 75 buses: BTreeMap<IdTable, Arc<dyn Bus>>, // 总线设备表 76 bus_drvs: BTreeMap<IdTable, Arc<dyn BusDriver>>, // 总线驱动表 77 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode
|
/DragonOS-0.1.8/docs/kernel/core_api/ |
D | casting.md | 42 ### 2.1 从Arc<dyn U>转换为Arc<T> 44   当我们需要把一个`Arc<dyn U>`转换为`Arc<T>`的具体类型指针时,我们要为`U`这个trait实现`DowncastArc`trait。这个trait定义在`k… 49 impl DowncastArc for dyn U { 50 fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any> { 59 let arc: Arc<dyn U> = ...;
|
/DragonOS-0.1.8/kernel/src/io/ |
D | disk_info.rs | 18 disk: Weak<dyn BlockDevice>, // 当前分区所属的磁盘 32 disk: Weak<dyn BlockDevice>, in new() 46 pub fn disk(&self) -> Arc<dyn BlockDevice> { in disk()
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | mount.rs | 17 inner_filesystem: Arc<dyn FileSystem>, 30 inner_inode: Arc<dyn IndexNode>, 39 inner_fs: Arc<dyn FileSystem>, in new() 79 pub fn inner_filesystem(&self) -> Arc<dyn FileSystem> { in inner_filesystem() 140 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() 176 fn fs(&self) -> Arc<dyn FileSystem> { in fs() 181 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 206 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() 215 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 250 target: &Arc<dyn IndexNode>, in move_() [all …]
|
D | core.rs | 36 static mut __ROOT_INODE: *mut Arc<dyn IndexNode> = null_mut(); 41 pub fn ROOT_INODE() -> Arc<dyn IndexNode> { in ROOT_INODE() 112 new_root_inode: Arc<dyn IndexNode>, in do_migrate() 133 fn migrate_virtual_filesystem(new_fs: Arc<dyn FileSystem>) -> Result<(), SystemError> { in migrate_virtual_filesystem() 155 let old_root_inode: Box<Arc<dyn IndexNode>> = Box::from_raw(__ROOT_INODE); in migrate_virtual_filesystem() 209 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_mkdir() 217 let parent_inode: Arc<dyn IndexNode> = in do_mkdir() 220 let _create_inode: Arc<dyn IndexNode> = in do_mkdir() 238 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_remove_dir() 250 let parent_inode: Arc<dyn IndexNode> = ROOT_INODE().lookup(parent_path.unwrap_or("/"))?; in do_remove_dir() [all …]
|
D | mod.rs | 189 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() 209 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() 221 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 260 _target: &Arc<dyn IndexNode>, in move_() 273 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 315 fn fs(&self) -> Arc<dyn FileSystem>; in fs() 319 fn as_any_ref(&self) -> &dyn Any; in as_any_ref() 326 fn mount(&self, _fs: Arc<dyn FileSystem>) -> Result<Arc<MountFS>, SystemError> { in mount() 343 impl DowncastArc for dyn IndexNode { 344 fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any> { in as_any_arc() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/uart/ |
D | uart.rs | 104 sys_info: Option<Arc<dyn IndexNode>>, 105 driver: Option<Arc<dyn PlatformDriver>>, 148 fn set_driver(&self, driver: Option<Arc<dyn PlatformDriver>>) { in set_driver() 158 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() 162 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() 170 fn as_any_ref(&'static self) -> &'static dyn core::any::Any { in as_any_ref() 181 sys_info: Option<Arc<dyn IndexNode>>, 207 fn as_any_ref(&'static self) -> &'static dyn core::any::Any { in as_any_ref() 215 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() 219 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/base/map/ |
D | mod.rs | 9 struct Probe(Arc<dyn KObject>); 15 pub fn new(data: Arc<dyn KObject>) -> Self { in new() 50 data: Arc<dyn KObject>, in kobj_map() 86 pub fn kobj_lookup(domain: Arc<LockedKObjMap>, dev_t: DeviceNumber) -> Option<Arc<dyn KObject>> { in kobj_lookup()
|
/DragonOS-0.1.8/kernel/src/net/ |
D | mod.rs | 20 …pub static ref NET_DRIVERS: RwLock<BTreeMap<usize, Arc<dyn NetDriver>>> = RwLock::new(BTreeMap::ne… 130 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() 184 fn box_clone(&self) -> Box<dyn Socket>; in box_clone() 204 impl Clone for Box<dyn Socket> { 205 fn clone(&self) -> Box<dyn Socket> { in clone()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 220 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() 231 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 285 let proc: Arc<dyn IndexNode> = self.root_inode(); in register_pid() 287 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid() 290 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid() 307 let proc: Arc<dyn IndexNode> = self.root_inode(); in unregister_pid() 309 let pid_dir: Arc<dyn IndexNode> = proc.find(&format!("{}", pid))?; in unregister_pid() 434 fn fs(&self) -> Arc<dyn FileSystem> { in fs() 438 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref() 477 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/ |
D | mod.rs | 15 fn as_any_ref(&'static self) -> &'static dyn core::any::Any; in as_any_ref()
|
/DragonOS-0.1.8/kernel/src/exception/ |
D | softirq.rs | 102 table: RwLock<[Option<Arc<dyn SoftirqVec>>; MAX_SOFTIRQ_NUM as usize]>, 106 let mut data: [MaybeUninit<Option<Arc<dyn SoftirqVec>>>; MAX_SOFTIRQ_NUM as usize] = in new() 113 let data: [Option<Arc<dyn SoftirqVec>>; MAX_SOFTIRQ_NUM as usize] = unsafe { in new() 114 mem::transmute::<_, [Option<Arc<dyn SoftirqVec>>; MAX_SOFTIRQ_NUM as usize]>(data) in new() 130 handler: Arc<dyn SoftirqVec>, in register_softirq()
|