/DragonOS-0.1.8/kernel/src/mm/allocator/ |
D | kernel_allocator.rs | 17 unsafe fn local_alloc(&self, layout: Layout) -> *mut u8; in local_alloc() 18 unsafe fn local_alloc_zeroed(&self, layout: Layout) -> *mut u8; in local_alloc_zeroed() 19 unsafe fn local_dealloc(&self, ptr: *mut u8, layout: Layout); in local_dealloc() 25 unsafe fn alloc_in_buddy(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { in alloc_in_buddy() 47 unsafe fn free_in_buddy(&self, ptr: *mut u8, layout: Layout) { in free_in_buddy() 58 unsafe fn local_alloc(&self, layout: Layout) -> *mut u8 { in local_alloc() 65 unsafe fn local_alloc_zeroed(&self, layout: Layout) -> *mut u8 { in local_alloc_zeroed() 76 unsafe fn local_dealloc(&self, ptr: *mut u8, layout: Layout) { in local_dealloc() 83 unsafe fn alloc(&self, layout: Layout) -> *mut u8 { in alloc() 88 unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { in alloc_zeroed() [all …]
|
D | page_frame.rs | 31 pub fn next_by(&self, n: usize) -> Self { in next_by() 95 pub fn next_by(&self, n: usize) -> Self { in next_by() 113 pub fn add(&self, n: PageFrameCount) -> Self { in add() 186 fn add(self, rhs: Self) -> Self::Output { in add() argument 192 fn add_assign(&mut self, rhs: Self) { in add_assign() 200 fn sub(self, rhs: Self) -> Self::Output { in sub() argument 206 fn sub_assign(&mut self, rhs: Self) { in sub_assign() 214 fn mul(self, rhs: Self) -> Self::Output { in mul() argument 222 fn add(self, rhs: usize) -> Self::Output { in add() argument 228 fn add_assign(&mut self, rhs: usize) { in add_assign() [all …]
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | wait_queue.rs | 44 pub fn sleep(&self) { in sleep() 54 pub fn sleep_with_func<F>(&self, f: F) in sleep_with_func() 80 pub unsafe fn sleep_without_schedule(&self) { in sleep_without_schedule() 89 pub fn sleep_uninterruptible(&self) { in sleep_uninterruptible() 99 pub fn sleep_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock() 110 pub fn sleep_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_unlock_mutex() 121 pub fn sleep_uninterruptible_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_uninterruptible_unlock_spinlock() 132 pub fn sleep_uninterruptible_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_uninterruptible_unlock_mutex() 148 pub fn wakeup(&self, state: u64) -> bool { in wakeup() 170 pub fn wakeup_all(&self, state: u64) { in wakeup_all()
|
D | notifier.rs | 12 fn notifier_call(&self, action: u64, data: Option<&T>) -> i32; in notifier_call() 29 &mut self, in register() 64 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() 79 &self, in call_chain() 106 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() 112 &mut self, in register_unique_prio() 119 pub fn unregister(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in unregister() 125 &self, in call_chain() 144 pub fn register(&mut self, block: Arc<dyn NotifierBlock<T>>) -> Result<(), SystemError> { in register() 150 &mut self, in register_unique_prio() [all …]
|
D | spinlock.rs | 75 pub fn lock(&self) { in lock() 80 pub fn lock_irq(&self) { in lock_irq() 105 pub fn unlock(&self) { in unlock() 112 unsafe fn unlock_no_preempt(&self) { in unlock_no_preempt() 117 pub fn unlock_irq(&self) { in unlock_irq() 132 pub unsafe fn set_value(&mut self, value: bool) { in set_value() 137 pub fn lock_irqsave(&self, flags: &mut usize) { in lock_irqsave() 143 pub fn unlock_irqrestore(&self, flags: usize) { in unlock_irqrestore() 152 pub fn try_lock_irqsave(&self, flags: &mut usize) -> bool { in try_lock_irqsave() 257 pub unsafe fn force_unlock(&self) { in force_unlock() [all …]
|
D | vec_cursor.rs | 101 pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), SystemError> { in read_exact() 113 pub fn read_u16_into(&mut self, buf: &mut [u16]) -> Result<(), SystemError> { in read_u16_into() 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() 197 pub fn write_u64(&mut self, value: u64) -> Result<u64, SystemError> { in write_u64() 216 pub fn write_exact(&mut self, buf: &[u8]) -> Result<(), SystemError> { in write_exact()
|
D | printk.rs | 106 pub fn __write_fmt(&mut self, args: fmt::Arguments) { in __write_fmt() 112 pub fn __write_string(&mut self, s: &str) { in __write_string() 123 pub fn __write_string_color(&self, fr_color: u32, bk_color: u32, s: &str) { in __write_string_color() 147 pub fn enable_alloc(&self) { in enable_alloc() 157 pub fn __utf8_to_ascii(&self, s: &str) -> Vec<u8> { in __utf8_to_ascii() 171 fn __write_string_on_stack(&self, s: &str) { in __write_string_on_stack() 191 fn __write_string_color_on_stack(&self, fr_color: u32, bk_color: u32, s: &str) { in __write_string_color_on_stack() 214 fn write_str(&mut self, s: &str) -> fmt::Result { in write_str()
|
/DragonOS-0.1.8/kernel/src/mm/ |
D | page.rs | 84 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() 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() 174 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { in fmt() 216 pub fn set_flags(&mut self, flags: PageFlags<Arch>) { in set_flags() 313 pub fn update_flags(mut self, flag: usize, value: bool) -> Self { in update_flags() [all …]
|
D | mod.rs | 101 pub fn add(self, offset: usize) -> Self { in add() argument 107 pub fn check_aligned(&self, align: usize) -> bool { in check_aligned() 118 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() 127 fn add(self, rhs: usize) -> Self::Output { in add() argument 134 fn add_assign(&mut self, rhs: usize) { in add_assign() 143 fn add(self, rhs: PhysAddr) -> Self::Output { in add() argument 150 fn add_assign(&mut self, rhs: PhysAddr) { in add_assign() 159 fn sub(self, rhs: usize) -> Self::Output { in sub() argument 166 fn sub_assign(&mut self, rhs: usize) { in sub_assign() 175 fn sub(self, rhs: PhysAddr) -> Self::Output { in sub() argument [all …]
|
D | ucontext.rs | 237 &mut self, in map_anonymous() 304 &mut self, in mmap() 368 &mut self, in munmap() 404 &mut self, in mprotect() 471 pub fn new_user_stack(&mut self, size: usize) -> Result<(), SystemError> { in new_user_stack() 484 pub unsafe fn unmap_all(&mut self) { in unmap_all() 500 pub unsafe fn set_brk(&mut self, new_brk: VirtAddr) -> Result<VirtAddr, SystemError> { in set_brk() 532 pub unsafe fn sbrk(&mut self, incr: isize) -> Result<VirtAddr, SystemError> { in sbrk() 550 fn drop(&mut self) { in drop() 569 fn drop(&mut self) { in drop() [all …]
|
D | mmio_buddy.rs | 95 fn create_region(&self, vaddr: VirtAddr) -> MmioBuddyAddrRegion { in create_region() 115 fn give_back_block(&self, vaddr: VirtAddr, exp: u32) -> Result<i32, SystemError> { in give_back_block() 136 &self, in split_block() 160 &self, in query_addr_region() 298 fn mmio_buddy_query_addr_region(&self, exp: u32) -> Result<MmioBuddyAddrRegion, MmioResult> { in mmio_buddy_query_addr_region() 315 &self, in push_block() 325 fn calculate_block_vaddr(&self, vaddr: VirtAddr, exp: u32) -> VirtAddr { in calculate_block_vaddr() 342 &self, in pop_buddy_block() 376 &self, in pop_block() 400 &self, in merge_all_exp() [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | mount.rs | 126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open() 130 fn close(&self, data: &mut FilePrivateData) -> Result<(), SystemError> { in close() 135 &self, in create_with_data() 146 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate() 151 &self, in read_at() 161 &self, in write_at() 191 fn set_metadata(&self, metadata: &super::Metadata) -> Result<(), SystemError> { in set_metadata() 196 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize() 202 &self, in create() 215 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() [all …]
|
D | mod.rs | 93 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() 102 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() 117 &self, in read_at() 134 &self, in write_at() 159 fn set_metadata(&self, _metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() 171 fn resize(&self, _len: usize) -> Result<(), SystemError> { in resize() 185 &self, in create() 204 &self, in create_with_data() 221 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 232 fn unlink(&self, _name: &str) -> Result<(), SystemError> { in unlink() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
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() 185 fn stdin_should_return(&self, c: u8) -> bool { in stdin_should_return() 199 fn write_stdin(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_stdin() 231 fn read_output(&self, buf: &mut [u8], block: bool) -> Result<usize, TtyError> { in read_output() 264 fn write_output(&self, buf: &[u8], block: bool) -> Result<usize, TtyError> { in write_output() 291 pub fn enable_echo(&self) { in enable_echo() [all …]
|
/DragonOS-0.1.8/kernel/src/process/ |
D | process.rs | 142 &mut self, in copy_files() 189 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { 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() 260 pub fn drop_fd(&self, fd: i32) -> Result<(), SystemError> { in drop_fd() 286 pub unsafe fn mark_sleep_interruptible(&mut self) { in mark_sleep_interruptible() 295 pub unsafe fn mark_sleep_uninterruptible(&mut self) { in mark_sleep_uninterruptible() 304 pub fn get_socket(&self, fd: i32) -> Option<Arc<SocketInode>> { in get_socket() 318 pub unsafe fn drop_address_space(&mut self) { in drop_address_space() 332 pub unsafe fn set_address_space(&mut self, address_space: Arc<AddressSpace>) { in set_address_space()
|
/DragonOS-0.1.8/kernel/src/driver/base/platform/ |
D | mod.rs | 40 pub fn matches(&self, other: &CompatibleTable) -> bool { in matches() 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() 124 &mut self, 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() 249 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/devfs/ |
D | mod.rs | 82 fn register_bultinin_device(&self) { in register_bultinin_device() 98 pub fn register_device<T: DeviceINode>( in register_device() 149 pub fn unregister_device<T: DeviceINode>( in unregister_device() 248 pub fn add_dir(&self, name: &str) -> Result<(), SystemError> { in add_dir() 265 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev() 276 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove() 289 &self, in do_create_with_data() 344 &self, in open() 351 fn close(&self, _data: &mut super::vfs::FilePrivateData) -> Result<(), SystemError> { in close() 356 &self, in create_with_data() [all …]
|
D | null_dev.rs | 62 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs() 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() 76 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() 92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() 110 &self, in read_at() 121 &self, in write_at()
|
D | zero_dev.rs | 62 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs() 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() 76 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() 92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() 110 &self, in read_at() 129 &self, in write_at()
|
/DragonOS-0.1.8/kernel/src/sched/ |
D | rt.rs | 52 pub fn enqueue(&mut self, pcb: &'static mut process_control_block) { in enqueue() 80 pub fn enqueue_front(&mut self, pcb: &'static mut process_control_block) { in enqueue_front() 133 pub fn pick_next_task_rt(&mut self, cpu_id: u32) -> Option<&'static mut process_control_block> { in pick_next_task_rt() 147 pub fn rt_queue_len(&mut self, cpu_id: u32) -> usize { in rt_queue_len() 157 pub fn load_list_len(&mut self, cpu_id: u32) -> usize { in load_list_len() 161 pub fn enqueue_front(&mut self, pcb: &'static mut process_control_block) { in enqueue_front() 214 fn enqueue(&mut self, pcb: &'static mut process_control_block) { in enqueue()
|
D | cfs.rs | 60 pub fn enqueue(&mut self, pcb: &'static mut process_control_block) { in enqueue() 142 pub fn timer_update_jiffies(&mut self) { in timer_update_jiffies() 160 pub fn enqueue_reset_vruntime(&mut self, pcb: &'static mut process_control_block) { in enqueue_reset_vruntime() 170 pub fn set_cpu_idle(&mut self, cpu_id: usize, pcb: *mut process_control_block) { in set_cpu_idle() 175 pub fn get_cfs_queue_len(&mut self, cpu_id: u32) -> usize { in get_cfs_queue_len() 232 fn enqueue(&mut self, pcb: &'static mut process_control_block) { in enqueue()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 46 fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> { in partial_cmp() 53 fn eq(&self, other: &Self) -> bool { in eq() 108 pub fn update_metadata(&mut self) { in update_metadata() 124 fn find(&mut self, name: &str) -> Result<Arc<LockedFATInode>, SystemError> { in find() 351 pub fn get_fat_entry(&self, cluster: Cluster) -> Result<FATEntry, SystemError> { in get_fat_entry() 450 pub fn get_fat_entry_raw(&self, cluster: Cluster) -> Result<u64, SystemError> { in get_fat_entry_raw() 533 pub fn cluster_bytes_offset(&self, cluster: Cluster) -> u64 { in cluster_bytes_offset() 551 pub fn allocate_cluster(&self, prev_cluster: Option<Cluster>) -> Result<Cluster, SystemError> { in allocate_cluster() 599 pub fn deallocate_cluster_chain(&self, start_cluster: Cluster) -> Result<(), SystemError> { in deallocate_cluster_chain() 610 pub fn deallocate_cluster(&self, cluster: Cluster) -> Result<(), SystemError> { in deallocate_cluster() [all …]
|
/DragonOS-0.1.8/kernel/src/time/ |
D | mod.rs | 144 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 152 fn add(self, rhs: Duration) -> Instant { in add() argument 158 fn add_assign(&mut self, rhs: Duration) { in add_assign() 166 fn sub(self, rhs: Duration) -> Instant { in sub() argument 172 fn sub_assign(&mut self, rhs: Duration) { in sub_assign() 180 fn sub(self, rhs: Instant) -> Duration { in sub() argument 240 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 248 fn add(self, rhs: Duration) -> Duration { in add() argument 254 fn add_assign(&mut self, rhs: Duration) { in add_assign() 262 fn sub(self, rhs: Duration) -> Duration { in sub() argument [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/ |
D | mod.rs | 118 &self, in read_at() 150 &self, in write_at() 208 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() 220 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize() 231 &self, in create_with_data() 282 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 313 fn unlink(&self, name: &str) -> Result<(), SystemError> { in unlink() 336 fn rmdir(&self, name: &str) -> Result<(), SystemError> { in rmdir() 355 &self, in move_() 373 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 | 68 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs() 78 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() 82 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() 98 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() 116 &self, in read_at() 135 &self, in write_at()
|