Home
last modified time | relevance | path

Searched refs:Option (Results 1 – 25 of 59) sorted by relevance

123

/DragonOS-0.1.8/kernel/src/libs/
Dffi_convert.rs4 fn convert_ref(src: *const T) -> Option<&'static Self>; in convert_ref()
6 fn convert_mut(src: *mut T) -> Option<&'static mut Self>; in convert_mut()
9 pub fn __convert_mut<'a, S, D>(src: *mut S) -> Option<&'a mut D> { in __convert_mut()
13 pub fn __convert_ref<'a, S, D>(src: *const S) -> Option<&'a D> { in __convert_ref()
Dnotifier.rs12 fn notifier_call(&self, action: u64, data: Option<&T>) -> i32; in notifier_call()
81 data: Option<&T>, in call_chain()
82 nr_to_call: Option<usize>, in call_chain()
127 data: Option<&T>, in call_chain()
128 nr_to_call: Option<usize>, in call_chain()
165 data: Option<&T>, in call_chain()
166 nr_to_call: Option<usize>, in call_chain()
192 data: Option<&T>, in call_chain()
193 nr_to_call: Option<usize>, in call_chain()
Drefcount.rs28 ) -> Option<&'static mut Self> { in convert_mut()
33 ) -> Option<&'static Self> { in convert_ref()
/DragonOS-0.1.8/kernel/src/driver/base/device/
Ddriver.rs42 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()
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()
108 sys_info: Option<Arc<dyn IndexNode>>, // sys information
Dmod.rs189 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()
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()
251 sys_info: Option<Arc<dyn IndexNode>>, // sys information
Dbus.rs81 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode
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()
/DragonOS-0.1.8/kernel/src/driver/base/platform/
Dmod.rs77 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()
211 sys_info: Option<Arc<dyn IndexNode>>,
243 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info()
249 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info()
324 fn set_driver(&self, driver: Option<Arc<LockedPlatformBusDriver>>) { in set_driver()
333 driver: Option<Arc<LockedPlatformBusDriver>>, // 总线驱动
334 sys_info: Option<Arc<dyn IndexNode>>, // 总线sys information
345 driver: Option::None, in new()
346 sys_info: Option::None, in new()
[all …]
Dplatform_device.rs29 fn set_driver(&self, driver: Option<Arc<dyn PlatformDriver>>); in set_driver()
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal_types.rs62 pub _sa_sigaction: ::core::option::Option<
378 ) -> Option<&'static mut Self> { in convert_mut()
383 ) -> Option<&'static Self> { in convert_ref()
394 ) -> Option<&'static mut Self> { in convert_mut()
399 ) -> Option<&'static Self> { in convert_ref()
410 ) -> Option<&'static mut Self> { in convert_mut()
415 ) -> Option<&'static Self> { in convert_ref()
426 ) -> Option<&'static mut Self> { in convert_mut()
431 ) -> Option<&'static Self> { in convert_ref()
442 ) -> Option<&'static mut Self> { in convert_mut()
[all …]
Dsignal.rs69 info: Option<&mut siginfo>, in signal_kill_something_info()
84 info: Option<&mut siginfo>, in signal_kill_proc_info()
124 info: Option<&mut siginfo>, in signal_send_sig_info()
157 ) -> Option<&'a mut sighand_struct> { in lock_process_sighand()
190 info: Option<&mut siginfo>, in send_signal_locked()
219 info: Option<&mut siginfo>, in __send_signal_locked()
229 let _pending: Option<&mut sigpending> = sigpending::convert_mut(&mut pcb.sig_pending); in __send_signal_locked()
276 let _signal: Option<&mut signal_struct> = signal_struct::convert_mut(pcb.signal); in complete_signal()
278 let mut _target: Option<&mut process_control_block> = None; in complete_signal()
430 Option<siginfo>, in get_signal_to_deliver()
[all …]
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dslab.rs45 pub fn allocate(&mut self, _layout: Layout) -> Option<*mut u8> { in allocate()
62 head: Option<&'static mut FreeBlock>,
85 fn pop(&mut self) -> Option<&'static mut FreeBlock> { in pop()
114 next: Option<&'static mut FreeBlock>,
Dpage_frame.rs67 fn next(&mut self) -> Option<Self::Item> { in next()
141 fn next(&mut self) -> Option<Self::Item> { in next()
174 pub fn from_bytes(bytes: usize) -> Option<Self> { in from_bytes()
287 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)>; in allocate()
292 unsafe fn allocate_one(&mut self) -> Option<PhysAddr> { in allocate_one()
305 unsafe fn allocate(&mut self, count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate()
311 unsafe fn allocate_one(&mut self) -> Option<PhysAddr> { in allocate_one()
325 pub unsafe fn allocate_page_frames(count: PageFrameCount) -> Option<(PhysAddr, PageFrameCount)> { in allocate_page_frames()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dutils.rs4 pub fn split_path(path: &str) -> (&str, Option<&str>) { in split_path()
15 pub fn rsplit_path(path: &str) -> (&str, Option<&str>) { in rsplit_path()
Dfile.rs295 pub fn try_clone(&self) -> Option<Box<File>> { in try_clone()
385 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD],
393 let mut data: [MaybeUninit<Option<Box<File>>>; 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()
424 pub fn from_pcb(pcb: &'static process_control_block) -> Option<&'static mut FileDescriptorVec> { in from_pcb()
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci.rs25 pub static ref PCI_ROOT_0: Option<PciRoot> = {
277 fn as_standard_device(&self) -> Option<&PciDeviceStructureGeneralDevice> { in as_standard_device()
282 fn as_pci_to_pci_bridge_device(&self) -> Option<&PciDeviceStructurePciToPciBridge> { in as_pci_to_pci_bridge_device()
287 fn as_pci_to_carbus_bridge_device(&self) -> Option<&PciDeviceStructurePciToCardbusBridge> { in as_pci_to_carbus_bridge_device()
295 fn as_standard_device_mut(&mut self) -> Option<&mut PciDeviceStructureGeneralDevice> { in as_standard_device_mut()
300 fn as_pci_to_pci_bridge_device_mut(&mut self) -> Option<&mut PciDeviceStructurePciToPciBridge> { in as_pci_to_pci_bridge_device_mut()
307 ) -> Option<&mut PciDeviceStructurePciToCardbusBridge> { in as_pci_to_carbus_bridge_device_mut()
311 fn capabilities(&self) -> Option<CapabilityIterator> { in capabilities()
339 fn bar_ioremap(&mut self) -> Option<Result<u8, PciError>> { in bar_ioremap()
345 fn bar(&mut self) -> Option<&PciStandardDeviceBar> { in bar()
[all …]
/DragonOS-0.1.8/kernel/src/sched/
Drt.rs17 pub static mut RT_SCHEDULER_PTR: Option<Box<SchedulerRT>> = None;
66 pub fn dequeue(&mut self) -> Option<&'static mut process_control_block> { in dequeue()
67 let res: Option<&'static mut process_control_block>; in dequeue()
133 pub fn pick_next_task_rt(&mut self, cpu_id: u32) -> Option<&'static mut process_control_block> { in pick_next_task_rt()
138 let proc: Option<&'static mut process_control_block> = cpu_queue_i.dequeue(); in pick_next_task_rt()
169 fn sched(&mut self) -> Option<&'static mut process_control_block> { in sched()
/DragonOS-0.1.8/kernel/src/driver/uart/
Duart.rs104 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()
181 sys_info: Option<Arc<dyn IndexNode>>,
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()
241 pub fn new(port: UartPort, baud_rate: u32, sys_info: Option<Arc<dyn IndexNode>>) -> Self { in new()
266 pub fn new(port: UartPort, baud_rate: u32, sys_info: Option<Arc<dyn IndexNode>>) -> Self { in new()
/DragonOS-0.1.8/kernel/src/mm/
Dpage.rs84 pub fn entry_base(&self, i: usize) -> Option<VirtAddr> { in entry_base()
94 pub unsafe fn entry_virt(&self, i: usize) -> Option<VirtAddr> { in entry_virt()
103 pub unsafe fn entry(&self, i: usize) -> Option<PageEntry<Arch>> { in entry()
109 pub unsafe fn set_entry(&self, i: usize, entry: PageEntry<Arch>) -> Option<()> { in set_entry() argument
121 pub fn entry_mapped(&self, i: usize) -> Option<bool> { in entry_mapped()
139 pub unsafe fn index_of(&self, addr: VirtAddr) -> Option<usize> { in index_of()
152 pub unsafe fn next_level_table(&self, index: usize) -> Option<Self> { in next_level_table()
495 pub unsafe fn create(table_kind: PageTableKind, mut allocator: F) -> Option<Self> { in create()
549 ) -> Option<PageFlush<Arch>> { in map()
562 ) -> Option<PageFlush<Arch>> { in map_phys()
[all …]
Dmod.rs35 static mut __INITIAL_PROCESS_ADDRESS_SPACE: Option<Arc<AddressSpace>> = None;
426 unsafe fn phys_2_virt(phys: PhysAddr) -> Option<VirtAddr> { in phys_2_virt()
444 unsafe fn virt_2_phys(virt: VirtAddr) -> Option<PhysAddr> { in virt_2_phys()
494 pub fn between(start: VirtAddr, end: VirtAddr) -> Option<Self> { in between()
505 pub fn intersect(&self, other: &VirtRegion) -> Option<VirtRegion> { in intersect()
556 pub fn before(self, region: &VirtRegion) -> Option<Self> { in before()
563 pub fn after(self, region: &VirtRegion) -> Option<Self> { in after()
573 pub fn rebase(self, vaddr: VirtAddr, new_base: &VirtRegion) -> Option<VirtAddr> { in rebase()
597 fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> { in partial_cmp()
Ducontext.rs104 pub user_stack: Option<UserStack>,
305 addr: Option<VirtAddr>, in mmap()
479 pub fn user_stack_mut(&mut self) -> Option<&mut UserStack> { in user_stack_mut()
607 pub fn contains(&self, vaddr: VirtAddr) -> Option<Arc<LockedVMA>> { in contains()
633 pub fn find_free(&self, min_vaddr: VirtAddr, size: usize) -> Option<VirtRegion> { in find_free()
703 let prev_hole: Option<(&VirtAddr, &mut usize)> = in reserve_hole()
726 let next_hole_size: Option<usize> = self.vm_holes.remove(&region.end()); in unreserve_hole()
759 pub fn remove_vma(&mut self, region: &VirtRegion) -> Option<Arc<LockedVMA>> { in remove_vma()
880 ) -> Option<( in extract()
881 Option<Arc<LockedVMA>>, in extract()
[all …]
/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()
197 let r: Option<&mut FileDescriptorVec> = FileDescriptorVec::from_pcb(current_pcb()); in alloc_fd()
235 pub fn get_file_mut_by_fd(&self, fd: i32) -> Option<&mut File> { in get_file_mut_by_fd()
249 pub fn get_file_ref_by_fd(&self, fd: i32) -> Option<&File> { in get_file_ref_by_fd()
267 let f: Option<&File> = r.fds[fd as usize].as_deref(); in drop_fd()
304 pub fn get_socket(&self, fd: i32) -> Option<Arc<SocketInode>> { in get_socket()
338 pub fn address_space(&self) -> Option<Arc<AddressSpace>> { in address_space()
/DragonOS-0.1.8/docs/kernel/filesystem/
Dsysfs.md39 sys_info: Option<Arc<dyn IndexNode>>, // sys information
57 sys_info: Option<Arc<dyn IndexNode>>, // sys information
77 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode
/DragonOS-0.1.8/kernel/src/exception/
Dsoftirq.rs30 static mut __CPU_PENDING: Option<Box<[VecStatus; MAX_CPU_NUM as usize]>> = None;
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()
/DragonOS-0.1.8/kernel/src/net/
Dmod.rs61 Ip(Option<IpEndpoint>),
80 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError>; in write()
137 fn endpoint(&self) -> Option<Endpoint> { in endpoint()
144 fn peer_endpoint(&self) -> Option<Endpoint> { in peer_endpoint()
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dcurrent.rs8 let ret: Option<&mut process_control_block>; in current_pcb()

123