/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()
|
H A D | semaphore.rs | 1 use core::sync::atomic::{AtomicI32, Ordering};
|
H A D | once.rs | 3 sync::atomic::Ordering,
|
H A D | lazy_init.rs | 23 use core::sync::atomic::{AtomicBool, Ordering};
|
/DragonOS/kernel/src/common/ |
H A D | atomic.h | 16 #define atomic_read(atomic) ((atomic)->value) // 读取原子变量 argument 17 #define atomic_set(atomic, val) (((atomic)->value) = (val)) // 设置原子变量的初始值 argument
|
/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()
|
H A D | init.rs | 1 use core::{fmt::Write, sync::atomic::Ordering};
|
/DragonOS/kernel/src/ipc/ |
H A D | signal.rs | 1 use core::sync::atomic::compiler_fence; 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() 375 compiler_fence(core::sync::atomic::Ordering::SeqCst); in flush_signal_handlers() [all …]
|
/DragonOS/kernel/src/smp/cpu/ |
H A D | mod.rs | 1 use core::sync::atomic::AtomicU32; 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/process/ |
H A D | timer.rs | 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/namespaces/ |
H A D | ucount.rs | 3 use core::{hash::Hash, sync::atomic::AtomicU32}; 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; 175 seq.fetch_add(1, core::sync::atomic::Ordering::SeqCst); in create_mnt_namespace()
|
/DragonOS/docs/kernel/core_api/ |
H A D | index.rst | 12 atomic
|
H A D | atomic.md | 5   DragonOS实现了原子变量,类型为atomic_t. 原子变量是基于具体体系结构的原子操作指令实现的。具体实现在`kernel/common/atomic.h`中。
|
/DragonOS/kernel/src/driver/disk/ahci/ |
H A D | mod.rs | 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()
|
H A D | hba.rs | 4 use core::sync::atomic::compiler_fence; 200 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init() 215 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init() 237 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init()
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | pmtmr.rs | 14 use core::sync::atomic::Ordering; in acpi_pm_read_early()
|
/DragonOS/kernel/src/net/ |
H A D | mod.rs | 3 sync::atomic::AtomicUsize, 27 return IFACE_ID.fetch_add(1, core::sync::atomic::Ordering::SeqCst); in generate_iface_id()
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | host_mem.rs | 164 atomic: bool, in __gfn_to_pfn() 171 let pfn = hva_to_pfn(addr, atomic, writable)?; in __gfn_to_pfn()
|
/DragonOS/kernel/src/debug/klog/ |
H A D | mm.rs | 3 use core::sync::atomic::{compiler_fence, Ordering};
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | slab.rs | 1 use core::{alloc::Layout, ptr::NonNull, sync::atomic::AtomicBool};
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | ept.rs | 9 use core::sync::atomic::{compiler_fence, AtomicUsize, Ordering};
|
/DragonOS/kernel/src/arch/x86_64/smp/ |
H A D | mod.rs | 3 sync::atomic::{compiler_fence, fence, AtomicBool, Ordering}, 60 compiler_fence(core::sync::atomic::Ordering::SeqCst); in smp_ap_start()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | file.rs | 1 use core::sync::atomic::{AtomicUsize, Ordering}; 250 self.offset.load(core::sync::atomic::Ordering::SeqCst), in read() 266 self.offset.load(core::sync::atomic::Ordering::SeqCst), in write() 325 .fetch_add(len, core::sync::atomic::Ordering::SeqCst); in do_read() 367 .fetch_add(len, core::sync::atomic::Ordering::SeqCst); in do_write()
|
/DragonOS/kernel/src/arch/x86_64/driver/apic/ |
H A D | x2apic.rs | 1 use core::sync::atomic::{fence, Ordering};
|