/DragonOS/kernel/src/sched/ |
H A D | idle.rs | 8 _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()
|
H A D | cputime.rs | 1 use core::sync::atomic::{compiler_fence, AtomicUsize, Ordering}; 7 use alloc::sync::Arc; 18 let seq = irqtime.sync.load(Ordering::SeqCst); in irq_time_read() 21 if seq == irqtime.sync.load(Ordering::SeqCst) { in irq_time_read() 34 pub sync: AtomicUsize, field 40 self.sync.fetch_add(1, Ordering::SeqCst); in account_delta()
|
/DragonOS/kernel/crates/intertrait/tests/ui/ |
H A D | duplicate-flags.stderr | 1 error: Duplicated flag: sync 4 5 | #[cast_to([sync, sync] Greet)]
|
H A D | duplicate-flags.rs | 3 use std::sync::Arc; 5 #[cast_to([sync, sync] Greet)]
|
H A D | unknown-flag.rs | 3 use std::sync::Arc; 5 #[cast_to([sync, send] Greet)]
|
H A D | unknown-flag.stderr | 4 5 | #[cast_to([sync, send] Greet)]
|
/DragonOS/kernel/src/libs/ |
H A D | int_like.rs | 77 pub fn load(&self, order: ::core::sync::atomic::Ordering) -> $new_type_name { 81 pub fn store(&self, val: $new_type_name, order: ::core::sync::atomic::Ordering) { 88 order: ::core::sync::atomic::Ordering, 97 success: ::core::sync::atomic::Ordering, 98 failure: ::core::sync::atomic::Ordering, 113 success: ::core::sync::atomic::Ordering, 114 failure: ::core::sync::atomic::Ordering, 130 order: ::core::sync::atomic::Ordering, 140 use ::core::sync::atomic::AtomicUsize; in test()
|
/DragonOS/kernel/src/driver/input/ps2_mouse/ |
H A D | ps_mouse_device.rs | 5 sync::{Arc, Weak}, 176 #[cast_to([sync] Device, SerioDevice)] 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() [all …]
|
H A D | ps_mouse_driver.rs | 3 sync::{Arc, Weak}, 74 #[cast_to([sync] Driver)] 75 #[cast_to([sync] SerioDriver)] 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()
|
/DragonOS/kernel/src/ipc/ |
H A D | signal.rs | 1 use core::sync::atomic::compiler_fence; 3 use alloc::sync::Arc; 70 compiler_fence(core::sync::atomic::Ordering::SeqCst); in send_signal_info() 85 compiler_fence(core::sync::atomic::Ordering::SeqCst); in send_signal_info() 89 compiler_fence(core::sync::atomic::Ordering::SeqCst); in send_signal_info() 124 compiler_fence(core::sync::atomic::Ordering::SeqCst); in send_signal() 162 compiler_fence(core::sync::atomic::Ordering::SeqCst); in send_signal() 175 compiler_fence(core::sync::atomic::Ordering::SeqCst); in complete_signal() 208 compiler_fence(core::sync::atomic::Ordering::SeqCst); in complete_signal() 364 compiler_fence(core::sync::atomic::Ordering::SeqCst); in flush_signal_handlers() [all …]
|
/DragonOS/kernel/src/driver/pci/ |
H A D | device.rs | 3 sync::{Arc, Weak}, 99 #[cast_to([sync] Device)] 136 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent() 204 fn set_bus(&self, bus: Option<alloc::sync::Weak<dyn Bus>>) { in set_bus() 216 fn set_driver(&self, driver: Option<alloc::sync::Weak<dyn Driver>>) { in set_driver() 228 fn set_class(&self, _class: Option<alloc::sync::Weak<dyn crate::driver::base::class::Class>>) { in set_class() 236 fn dev_parent(&self) -> Option<alloc::sync::Weak<dyn Device>> { in dev_parent() 240 fn set_dev_parent(&self, dev_parent: Option<alloc::sync::Weak<dyn Device>>) { in set_dev_parent()
|
/DragonOS/kernel/src/mm/ |
H A D | percpu.rs | 1 use core::sync::atomic::AtomicU32; 36 if cpu_num.load(core::sync::atomic::Ordering::SeqCst) != 0 { in init() 42 CPU_NUM_ATOMIC.store(cpus, core::sync::atomic::Ordering::SeqCst); in init() 69 let cpu_num = CPU_NUM_ATOMIC.load(core::sync::atomic::Ordering::SeqCst); in new()
|
/DragonOS/kernel/src/process/ |
H A D | timer.rs | 8 use alloc::{boxed::Box, sync::Arc}; 9 use core::sync::atomic::compiler_fence; 135 compiler_fence(core::sync::atomic::Ordering::SeqCst); in run() 140 compiler_fence(core::sync::atomic::Ordering::SeqCst); in run()
|
/DragonOS/kernel/src/smp/cpu/ |
H A D | mod.rs | 1 use core::sync::atomic::AtomicU32; 3 use alloc::{sync::Arc, vec::Vec}; 123 .fetch_add(1, core::sync::atomic::Ordering::SeqCst); in set_possible_cpu() 126 .fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in set_possible_cpu() 138 self.possible_cnt.load(core::sync::atomic::Ordering::SeqCst) in possible_cpus_count() 142 self.present_cnt.load(core::sync::atomic::Ordering::SeqCst) in present_cpus_count() 153 .fetch_add(1, core::sync::atomic::Ordering::SeqCst); in set_present_cpu() 156 .fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in set_present_cpu()
|
/DragonOS/kernel/src/namespaces/ |
H A D | ucount.rs | 3 use core::{hash::Hash, sync::atomic::AtomicU32}; 6 use alloc::sync::Arc; 77 .fetch_add(1, core::sync::atomic::Ordering::SeqCst); in alloc_ucounts() 107 let num = iter.ucount[uc_type].fetch_add(1, core::sync::atomic::Ordering::SeqCst); in inc_ucounts() 112 add_iter.ucount[uc_type].fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in inc_ucounts() 140 let num = iter.ucount[uc_type].fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in dec_ucount()
|
H A D | mnt_namespace.rs | 2 use core::sync::atomic::AtomicU64; 3 use core::sync::atomic::Ordering; 10 use alloc::sync::Arc; 175 seq.fetch_add(1, core::sync::atomic::Ordering::SeqCst); in create_mnt_namespace()
|
/DragonOS/kernel/src/driver/tty/ |
H A D | tty_driver.rs | 5 sync::{Arc, Weak}, 103 #[cast_to([sync] Driver)] 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() 442 ) -> alloc::vec::Vec<alloc::sync::Arc<dyn crate::driver::base::device::Device>> { in devices() 446 fn add_device(&self, _device: alloc::sync::Arc<dyn crate::driver::base::device::Device>) { in add_device() [all …]
|
H A D | tty_device.rs | 3 sync::{Arc, Weak}, 98 #[cast_to([sync] Device)] 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() 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() 563 _dev_parent: Option<alloc::sync::Weak<dyn crate::driver::base::device::Device>>, in set_dev_parent() 578 fn sync(&self) -> Result<(), SystemError> { in sync() method
|
/DragonOS/kernel/src/driver/base/block/ |
H A D | gendisk.rs | 3 sync::atomic::{AtomicU32, Ordering}, 6 use alloc::sync::{Arc, Weak}; 144 pub fn sync(&self) -> Result<(), SystemError> { in sync() method 145 self.block_device().sync() in sync()
|
/DragonOS/kernel/src/driver/disk/ahci/ |
H A D | mod.rs | 11 use alloc::sync::Arc; 20 use core::sync::atomic::compiler_fence; 118 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_init() 132 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_init()
|
/DragonOS/kernel/src/net/ |
H A D | mod.rs | 3 sync::atomic::AtomicUsize, 6 use alloc::{collections::BTreeMap, sync::Arc}; 27 return IFACE_ID.fetch_add(1, core::sync::atomic::Ordering::SeqCst); in generate_iface_id()
|
/DragonOS/kernel/src/driver/base/ |
H A D | swnode.rs | 1 use alloc::sync::Arc;
|
/DragonOS/tools/debugging/logmonitor/src/constant/ |
H A D | mod.rs | 1 use std::sync::RwLock;
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | glue.rs | 1 use alloc::sync::Arc;
|
/DragonOS/kernel/crates/intertrait/macros/src/ |
H A D | gen_caster.rs | 11 pub fn generate_caster(ty: &impl ToTokens, trait_: &impl ToTokens, sync: bool) -> TokenStream { in generate_caster() 15 let new_caster = if sync { in generate_caster()
|