Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 295) sorted by relevance

12345678910>>...12

/DragonOS/kernel/src/sched/
H A Didle.rs8 _pcb: alloc::sync::Arc<crate::process::ProcessControlBlock>, in enqueue()
16 _pcb: alloc::sync::Arc<crate::process::ProcessControlBlock>, in dequeue()
25 _pcb: &alloc::sync::Arc<crate::process::ProcessControlBlock>, in check_preempt_currnet()
33 ) -> Option<alloc::sync::Arc<crate::process::ProcessControlBlock>> { in pick_task()
42 _pcb: Option<alloc::sync::Arc<crate::process::ProcessControlBlock>>, in pick_next_task()
43 ) -> Option<alloc::sync::Arc<crate::process::ProcessControlBlock>> { in pick_next_task()
51 _pcb: alloc::sync::Arc<crate::process::ProcessControlBlock>, in tick()
57 fn task_fork(_pcb: alloc::sync::Arc<crate::process::ProcessControlBlock>) { in task_fork()
63 _prev: alloc::sync::Arc<crate::process::ProcessControlBlock>, in put_prev_task()
/DragonOS/kernel/crates/ida/src/
H A Dlib.rs81 pub fn alloc(&mut self) -> Option<usize> { in alloc() method
179 assert_eq!(ida.alloc(), Some(0)); in test_id_allocator()
180 assert_eq!(ida.alloc(), Some(1)); in test_id_allocator()
181 assert_eq!(ida.alloc(), Some(2)); in test_id_allocator()
182 assert_eq!(ida.alloc(), Some(3)); in test_id_allocator()
183 assert_eq!(ida.alloc(), Some(4)); in test_id_allocator()
184 assert_eq!(ida.alloc(), Some(5)); in test_id_allocator()
185 assert_eq!(ida.alloc(), Some(6)); in test_id_allocator()
186 assert_eq!(ida.alloc(), Some(7)); in test_id_allocator()
187 assert_eq!(ida.alloc(), Some(8)); in test_id_allocator()
[all …]
/DragonOS/kernel/src/driver/input/ps2_mouse/
H A Dps_mouse_device.rs3 use alloc::{
442 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus()
446 fn set_class(&self, class: Option<alloc::sync::Weak<dyn Class>>) { in set_class()
450 fn driver(&self) -> Option<alloc::sync::Arc<dyn Driver>> { in driver()
454 fn set_driver(&self, driver: Option<alloc::sync::Weak<dyn Driver>>) { in set_driver()
468 fn bus(&self) -> Option<alloc::sync::Weak<dyn Bus>> { in bus()
482 fn dev_parent(&self) -> Option<alloc::sync::Weak<dyn Device>> { in dev_parent()
486 fn set_dev_parent(&self, dev_parent: Option<alloc::sync::Weak<dyn Device>>) { in set_dev_parent()
494 _device: &alloc::sync::Arc<dyn SerioDevice>, in write()
502 _device: &alloc::sync::Arc<dyn SerioDevice>, in open()
[all …]
H A Dps_mouse_driver.rs1 use alloc::{
131 fn devices(&self) -> alloc::vec::Vec<Arc<dyn Device>> { in devices()
150 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus()
172 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent()
176 fn set_parent(&self, parent: Option<alloc::sync::Weak<dyn KObject>>) { in set_parent()
196 fn name(&self) -> alloc::string::String { in name()
200 fn set_name(&self, _name: alloc::string::String) {} in set_name()
/DragonOS/kernel/src/namespaces/
H A Duser_namespace.rs3 use alloc::boxed::Box;
6 use alloc::string::String;
7 use alloc::string::ToString;
9 use alloc::vec::Vec;
16 use alloc::sync::Arc;
H A Dpid_namespace.rs2 use alloc::vec::Vec;
15 use alloc::boxed::Box;
16 use alloc::string::String;
17 use alloc::string::ToString;
18 use alloc::sync::Arc;
112 .alloc() in alloc_pid()
/DragonOS/kernel/src/driver/pci/
H A Ddevice.rs1 use alloc::{
129 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent()
197 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus()
209 fn set_driver(&self, driver: Option<alloc::sync::Weak<dyn Driver>>) { in set_driver()
221 fn set_class(&self, _class: Option<alloc::sync::Weak<dyn crate::driver::base::class::Class>>) { in set_class()
229 fn dev_parent(&self) -> Option<alloc::sync::Weak<dyn Device>> { in dev_parent()
233 fn set_dev_parent(&self, dev_parent: Option<alloc::sync::Weak<dyn Device>>) { in set_dev_parent()
/DragonOS/kernel/src/libs/
H A Dalign.rs4 use core::{alloc::GlobalAlloc, fmt::Debug, ptr::Unique};
23 const LAYOUT: core::alloc::Layout = {
31 let layout = core::alloc::Layout::from_size_align(
111 Self::new_zeroed().unwrap_or_else(|_| alloc::alloc::handle_alloc_error(Self::LAYOUT)); in clone()
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dentry.rs1 use alloc::sync::Arc;
3 use alloc::vec::Vec;
/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs3 use alloc::{
310 idx = self.ida.lock().alloc().ok_or(SystemError::EBUSY)?; in init_tty_device()
378 fn set_inode(&self, _inode: Option<alloc::sync::Arc<crate::filesystem::kernfs::KernFSInode>>) { in set_inode()
382 fn inode(&self) -> Option<alloc::sync::Arc<crate::filesystem::kernfs::KernFSInode>> { in inode()
386 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent()
390 fn set_parent(&self, _parent: Option<alloc::sync::Weak<dyn KObject>>) { in set_parent()
394 fn kset(&self) -> Option<alloc::sync::Arc<crate::driver::base::kset::KSet>> { in kset()
398 fn set_kset(&self, _kset: Option<alloc::sync::Arc<crate::driver::base::kset::KSet>>) { in set_kset()
410 fn name(&self) -> alloc::string::String { in name()
414 fn set_name(&self, _name: alloc::string::String) { in set_name()
[all …]
H A Dtty_device.rs1 use alloc::{
286 fn list(&self) -> Result<alloc::vec::Vec<alloc::string::String>, system_error::SystemError> { in list()
438 fn set_fs(&self, fs: alloc::sync::Weak<crate::filesystem::devfs::DevFS>) { in set_fs()
456 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent()
460 fn set_parent(&self, parent: Option<alloc::sync::Weak<dyn KObject>>) { in set_parent()
478 fn name(&self) -> alloc::string::String { in name()
482 fn set_name(&self, _name: alloc::string::String) { in set_name()
516 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn crate::driver::base::device::bus::Bus>>) { in set_bus()
536 driver: Option<alloc::sync::Weak<dyn crate::driver::base::device::driver::Driver>>, in set_driver()
557 fn dev_parent(&self) -> Option<alloc::sync::Weak<dyn crate::driver::base::device::Device>> { in dev_parent()
[all …]
/DragonOS/kernel/src/driver/virtio/
H A Dvirtio.rs16 use alloc::string::String;
17 use alloc::sync::Arc;
18 use alloc::vec::Vec;
19 use alloc::{boxed::Box, collections::LinkedList};
/DragonOS/kernel/src/cgroup/
H A Dmod.rs4 use alloc::{collections::LinkedList, rc::Weak, sync::Arc, vec::Vec};
6 use alloc::boxed::Box;
/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dlib.rs28 extern crate alloc;
38 use core::alloc::Layout;
/DragonOS/kernel/src/perf/
H A Dkprobe.rs14 use alloc::boxed::Box;
15 use alloc::string::String;
16 use alloc::sync::Arc;
17 use alloc::vec::Vec;
/DragonOS/kernel/src/filesystem/
H A Deventfd.rs10 use alloc::collections::LinkedList;
11 use alloc::string::String;
12 use alloc::sync::Arc;
13 use alloc::sync::Weak;
14 use alloc::vec::Vec;
266 .alloc() in sys_eventfd()
/DragonOS/kernel/crates/kprobe/src/
H A Dlib.rs3 extern crate alloc;
/DragonOS/kernel/src/bpf/prog/
H A Dmod.rs14 use alloc::string::String;
15 use alloc::sync::Arc;
16 use alloc::vec::Vec;
/DragonOS/kernel/src/driver/base/
H A Dswnode.rs1 use alloc::sync::Arc;
/DragonOS/kernel/src/driver/acpi/
H A Dglue.rs1 use alloc::sync::Arc;
/DragonOS/kernel/crates/klog_types/src/
H A Dlib.rs6 extern crate alloc;
9 use alloc::format;
130 pub layout: core::alloc::Layout,
136 pub fn new(layout: core::alloc::Layout, vaddr: Option<usize>, paddr: Option<usize>) -> Self { in new()
/DragonOS/kernel/src/debug/kprobe/
H A Dargs.rs1 use alloc::boxed::Box;
2 use alloc::string::String;
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs3 use alloc::{
63 self.pts_ida.lock().alloc().ok_or(SystemError::ENOSPC) in alloc_index()
186 fn fs(&self) -> alloc::sync::Arc<dyn super::vfs::FileSystem> { in fs()
194 fn list(&self) -> Result<alloc::vec::Vec<alloc::string::String>, system_error::SystemError> { in list()
/DragonOS/kernel/src/mm/allocator/
H A Dslab.rs1 use core::{alloc::Layout, ptr::NonNull, sync::atomic::AtomicBool};
3 use alloc::boxed::Box;
/DragonOS/kernel/src/driver/block/cache/
H A Dmod.rs1 use alloc::vec::Vec;

12345678910>>...12