/DragonOS-0.1.7/kernel/src/process/ |
D | fork.rs | 3 use alloc::boxed::Box; 33 let mut sig: &mut sighand_struct = Box::leak(Box::new(sighand_struct::default())); in process_copy_sighand() 89 let sig: &mut signal_struct = Box::leak(Box::new(signal_struct::default())); in process_copy_signal() 104 Box::leak(Box::new(SigQueue::default())) as *mut SigQueue as *mut c_void; in process_copy_signal() 114 let sighand = Box::from_raw((*pcb).sighand as *mut sighand_struct); in process_exit_signal() 120 let queue = Box::from_raw((*pcb).sig_pending.sigqueue as *mut SigQueue); in process_exit_signal() 129 let sig = Box::from_raw((*pcb).signal as *mut signal_struct); in process_exit_sighand()
|
D | initial_proc.rs | 3 use alloc::boxed::Box; 43 Box::leak(Box::new(SigQueue::default())) as *mut SigQueue as *mut c_void; in initial_proc_init_signal()
|
D | process.rs | 6 use alloc::{boxed::Box, sync::Arc}; 127 let fd_vec: &mut FileDescriptorVec = Box::leak(FileDescriptorVec::new()); in init_files() 160 let new_fd_vec: &mut FileDescriptorVec = Box::leak(old_fds.clone()); in copy_files() 173 let old_fds: Box<FileDescriptorVec> = in exit_files() 174 unsafe { Box::from_raw(self.fds as *mut FileDescriptorVec) }; in exit_files() 209 *x = Some(Box::new(file)); in alloc_fd() 219 *x = Some(Box::new(file)); in alloc_fd() 368 return Box::leak(Box::new(FpState::default())) as *mut FpState as usize as *mut c_void; in rs_dup_fpstate() 374 let state: &mut FpState = Box::leak(Box::new(s.clone())); in rs_dup_fpstate() 387 drop(Box::from_raw(state)); in rs_process_exit_fpstate()
|
/DragonOS-0.1.7/kernel/src/filesystem/vfs/ |
D | file.rs | 3 use alloc::{boxed::Box, string::String, sync::Arc, vec::Vec}; 277 pub fn try_clone(&self) -> Option<Box<File>> { in try_clone() 278 let mut res: Box<File> = Box::new(Self { in try_clone() 320 pub fds: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD], 326 pub fn new() -> Box<FileDescriptorVec> { in new() 328 let mut data: [MaybeUninit<Option<Box<File>>>; FileDescriptorVec::PROCESS_MAX_FD] = in new() 336 let data: [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD] = unsafe { in new() 337 core::mem::transmute::<_, [Option<Box<File>>; FileDescriptorVec::PROCESS_MAX_FD]>(data) in new() 341 return Box::new(FileDescriptorVec { fds: data }); in new() 347 pub fn clone(&self) -> Box<FileDescriptorVec> { in clone() [all …]
|
D | core.rs | 7 use alloc::{boxed::Box, format, string::ToString, sync::Arc}; 54 let root_inode = Box::leak(Box::new(mount_fs.root_inode())); in vfs_init() 148 let new_root_inode = Box::leak(Box::new(new_fs.root_inode())); in migrate_virtual_filesystem() 157 let old_root_inode: Box<Arc<dyn IndexNode>> = Box::from_raw(__ROOT_INODE); in migrate_virtual_filesystem()
|
/DragonOS-0.1.7/kernel/src/mm/ |
D | mmio_buddy.rs | 12 use alloc::{boxed::Box, collections::LinkedList, vec::Vec}; 61 fn create_region(&self, vaddr: u64) -> Box<MmioBuddyAddrRegion> { in create_region() 62 let mut region: Box<MmioBuddyAddrRegion> = Box::new(MmioBuddyAddrRegion::new()); in create_region() 83 let region: Box<MmioBuddyAddrRegion> = self.create_region(vaddr); in give_back_block() 100 region: Box<MmioBuddyAddrRegion>, in split_block() 105 let new_region: Box<MmioBuddyAddrRegion> = self.create_region(vaddr); in split_block() 126 ) -> Result<Box<MmioBuddyAddrRegion>, MmioResult> { in query_addr_region() 264 ) -> Result<Box<MmioBuddyAddrRegion>, MmioResult> { in mmio_buddy_query_addr_region() 282 region: Box<MmioBuddyAddrRegion>, in push_block() 312 ) -> Result<Box<MmioBuddyAddrRegion>, MmioResult> { in pop_buddy_block() [all …]
|
/DragonOS-0.1.7/kernel/src/sched/ |
D | rt.rs | 3 use alloc::{boxed::Box, collections::LinkedList, vec::Vec}; 30 RT_SCHEDULER_PTR = Box::leak(Box::new(SchedulerRT::new())); in sched_rt_init() 122 result.cpu_queue[cpu_id as usize].push(Box::leak(Box::new(RTQueue::new()))); in new() 129 .push(Box::leak(Box::new(LinkedList::new()))); in new()
|
D | cfs.rs | 3 use alloc::{boxed::Box, vec::Vec}; 30 CFS_SCHEDULER_PTR = Box::leak(Box::new(SchedulerCFS::new())); in sched_cfs_init() 125 .push(Box::leak(Box::new(CFSQueue::new(null_mut())))); in new()
|
/DragonOS-0.1.7/docs/kernel/sched/ |
D | kernel_timer.md | 32 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self> 145 pub fn new(para: i32) -> Box<TimerExample> { 146 return Box::new(TimerExample { 163 let timer_example: Box<TimerExample> = TimerExample::new(1);
|
/DragonOS-0.1.7/kernel/src/driver/virtio/ |
D | virtio.rs | 10 use alloc::{boxed::Box, collections::LinkedList}; 75 list: &'a mut RwLockWriteGuard<'_, LinkedList<Box<dyn PciDeviceStructure>>>, in virtio_device_search() 87 list: &'a mut RwLockWriteGuard<'_, LinkedList<Box<dyn PciDeviceStructure>>>, in get_virtio_net_device()
|
/DragonOS-0.1.7/kernel/src/arch/x86_64/ |
D | fpu.rs | 10 use alloc::boxed::Box; 86 let f = Box::leak(Box::new(FpState::default())); in fp_state_save()
|
/DragonOS-0.1.7/kernel/src/net/ |
D | mod.rs | 6 use alloc::{boxed::Box, collections::BTreeMap, sync::Arc}; 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> { implementation 205 fn clone(&self) -> Box<dyn Socket> { in clone()
|
D | net_core.rs | 1 use alloc::{boxed::Box, collections::BTreeMap, sync::Arc}; 23 let timer = Timer::new(Box::new(NetWorkPollFunc()), next_time); in run() 32 let timer = Timer::new(Box::new(NetWorkPollFunc()), next_time); in net_init()
|
D | socket.rs | 2 use alloc::{boxed::Box, sync::Arc, vec::Vec}; 277 fn box_clone(&self) -> alloc::boxed::Box<dyn Socket> { in box_clone() 278 return Box::new(self.clone()); in box_clone() 467 fn box_clone(&self) -> alloc::boxed::Box<dyn Socket> { in box_clone() 468 return Box::new(self.clone()); in box_clone() 757 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() 788 Box::new(TcpSocket { in accept() 831 fn box_clone(&self) -> alloc::boxed::Box<dyn Socket> { in box_clone() 832 return Box::new(self.clone()); in box_clone() 989 pub struct SocketInode(SpinLock<Box<dyn Socket>>); [all …]
|
D | syscall.rs | 3 use alloc::{boxed::Box, sync::Arc}; 48 let socket: Box<dyn Socket> = match address_family { in do_socket() 50 PosixSocketType::Stream => Box::new(TcpSocket::new(SocketOptions::default())), in do_socket() 51 PosixSocketType::Datagram => Box::new(UdpSocket::new(SocketOptions::default())), in do_socket() 52 PosixSocketType::Raw => Box::new(RawSocket::new( in do_socket()
|
/DragonOS-0.1.7/kernel/src/filesystem/sysfs/ |
D | mod.rs | 11 boxed::Box, 114 __SYS_DEVICES_INODE = Box::leak(Box::new(devices)); in new() 121 __SYS_BUS_INODE = Box::leak(Box::new(bus)); in new() 128 __SYS_CLASS_INODE = Box::leak(Box::new(class)); in new() 135 __SYS_FS_INODE = Box::leak(Box::new(fs)); in new()
|
/DragonOS-0.1.7/kernel/src/exception/ |
D | softirq.rs | 9 use alloc::{boxed::Box, sync::Arc}; 31 static mut __CPU_PENDING: Option<Box<[VecStatus; MAX_CPU_NUM as usize]>> = None; 42 __SORTIRQ_VECTORS = Box::leak(Box::new(Softirq::new())); in softirq_init() 43 __CPU_PENDING = Some(Box::new([VecStatus::default(); MAX_CPU_NUM as usize])); in softirq_init()
|
/DragonOS-0.1.7/kernel/src/time/ |
D | timer.rs | 4 boxed::Box, 41 pub fn new(pcb: &'static mut process_control_block) -> Box<WakeUpHelper> { in new() 42 return Box::new(WakeUpHelper { pcb }); in new() 64 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self> { in new() 118 pub timer_func: Box<dyn TimerFunction>,
|
D | sleep.rs | 3 use alloc::{boxed::Box, sync::Arc}; 45 let handler: Box<WakeUpHelper> = WakeUpHelper::new(current_pcb()); in nano_sleep()
|
/DragonOS-0.1.7/user/libs/libc/ |
D | build.rs | 35 .parse_callbacks(Box::new(bindgen::CargoCallbacks)) in main()
|
/DragonOS-0.1.7/kernel/ |
D | build.rs | 37 .parse_callbacks(Box::new(bindgen::CargoCallbacks)) in main()
|
/DragonOS-0.1.7/kernel/src/driver/disk/ahci/ |
D | mod.rs | 23 use alloc::boxed::Box; 78 Box::leak(Box::new([0u8; (1 << 20) as usize])) as *mut u8 as usize; in ahci_rust_init()
|
/DragonOS-0.1.7/kernel/src/driver/pci/ |
D | pci.rs | 12 use alloc::{boxed::Box, collections::LinkedList}; 71 list: RwLock<LinkedList<Box<dyn PciDeviceStructure>>>, 83 pub fn read(&self) -> RwLockReadGuard<LinkedList<Box<dyn PciDeviceStructure>>> { in read() 88 pub fn write(&self) -> RwLockWriteGuard<LinkedList<Box<dyn PciDeviceStructure>>> { in write() 98 pub fn add(&self, device: Box<dyn PciDeviceStructure>) { in add() 110 list: &'a mut RwLockWriteGuard<'_, LinkedList<Box<dyn PciDeviceStructure>>>, in get_pci_device_structure_mut() 113 ) -> Vec<&'a mut Box<(dyn PciDeviceStructure)>> { in get_pci_device_structure_mut() 129 list: &'a mut RwLockReadGuard<'_, LinkedList<Box<dyn PciDeviceStructure>>>, in get_pci_device_structure() 132 ) -> Vec<&'a Box<(dyn PciDeviceStructure)>> { in get_pci_device_structure() 650 ) -> Result<Box<dyn PciDeviceStructure>, PciError> { in pci_read_header() [all …]
|
/DragonOS-0.1.7/docs/kernel/memory_management/ |
D | mmio.md | 141 list: LinkedList<Box<MmioBuddyAddrRegion>>,
|
/DragonOS-0.1.7/kernel/src/libs/ |
D | rbtree.rs | 23 use alloc::boxed::Box; 102 NodePtr(Box::into_raw(Box::new(node))) in new() 658 let obj = unsafe { Box::from_raw(self.tail.0) }; in next_back() 1196 drop(Box::from_raw(current.0)); in clear_recurse() 1342 let obj = Box::from_raw(node.0); in delete() 1372 let obj = Box::from_raw(node.0); in delete()
|