Home
last modified time | relevance | path

Searched refs:atomic (Results 1 – 25 of 43) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dmod.rs26 use core::sync::atomic::compiler_fence;
53 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
61 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
70 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
79 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
83 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
90 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
111 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
125 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
158 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
[all …]
Dahcidisk.rs22 use core::sync::atomic::compiler_fence;
59 compiler_fence(core::sync::atomic::Ordering::SeqCst); in read_at()
207 compiler_fence(core::sync::atomic::Ordering::SeqCst); in read_at()
218 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
237 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
247 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
259 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
289 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
350 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
Dhba.rs4 use core::sync::atomic::compiler_fence;
203 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init()
212 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init()
224 compiler_fence(core::sync::atomic::Ordering::SeqCst); in init()
/DragonOS-0.1.8/kernel/src/common/
Datomic.h14 #define atomic_read(atomic) ((atomic)->value) // 读取原子变量 argument
15 #define atomic_set(atomic,val) (((atomic)->value) = (val)) // 设置原子变量的初始值 argument
/DragonOS-0.1.8/kernel/src/libs/
Dint_like.rs66 pub fn load(&self, order: ::core::sync::atomic::Ordering) -> $new_type_name {
70 pub fn store(&self, val: $new_type_name, order: ::core::sync::atomic::Ordering) {
77 order: ::core::sync::atomic::Ordering,
86 success: ::core::sync::atomic::Ordering,
87 failure: ::core::sync::atomic::Ordering,
102 success: ::core::sync::atomic::Ordering,
103 failure: ::core::sync::atomic::Ordering,
121 use ::core::sync::atomic::AtomicUsize; in test()
Dmod.rs2 pub mod atomic; module
Dsemaphore.rs1 use core::sync::atomic::{AtomicI32, Ordering};
Drefcount.rs7 atomic::atomic_read,
Dlazy_init.rs23 use core::sync::atomic::{AtomicBool, Ordering};
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dcurrent.rs3 use core::{arch::asm, sync::atomic::compiler_fence};
12 compiler_fence(core::sync::atomic::Ordering::SeqCst); in current_pcb()
14 compiler_fence(core::sync::atomic::Ordering::SeqCst); in current_pcb()
/DragonOS-0.1.8/kernel/src/process/
Dfork.rs1 use core::{ffi::c_void, ptr::null_mut, sync::atomic::compiler_fence};
15 atomic::atomic_set,
50 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
56 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
65 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
68 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
72 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
75 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
77 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
Dmod.rs3 sync::atomic::{compiler_fence, Ordering},
/DragonOS-0.1.8/kernel/src/arch/x86_64/
Dcontext.rs3 use core::sync::atomic::compiler_fence;
18 compiler_fence(core::sync::atomic::Ordering::SeqCst); in switch_process()
30 compiler_fence(core::sync::atomic::Ordering::SeqCst); in switch_process()
/DragonOS-0.1.8/kernel/src/sched/
Dcfs.rs1 use core::{ptr::null_mut, sync::atomic::compiler_fence};
192 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
197 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
201 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
204 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
210 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
217 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
223 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
225 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
227 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
Dcore.rs1 use core::sync::atomic::compiler_fence;
76 compiler_fence(core::sync::atomic::Ordering::SeqCst); in do_sched()
79 compiler_fence(core::sync::atomic::Ordering::SeqCst); in do_sched()
104 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
117 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
125 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
Drt.rs1 use core::sync::atomic::compiler_fence;
184 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
202 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
/DragonOS-0.1.8/kernel/src/mm/
Dpercpu.rs1 use core::sync::atomic::AtomicUsize;
28 if CPU_NUM.load(core::sync::atomic::Ordering::SeqCst) != 0 { in init()
33 CPU_NUM.store(cpus, core::sync::atomic::Ordering::SeqCst); in init()
60 let cpu_num = CPU_NUM.load(core::sync::atomic::Ordering::SeqCst); in new()
/DragonOS-0.1.8/docs/kernel/core_api/
Dindex.rst12 atomic
Datomic.md5   DragonOS实现了原子变量,类型为atomic_t. 原子变量是基于具体体系结构的原子操作指令实现的。具体实现在`kernel/common/atomic.h`中。
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal.rs5 sync::atomic::compiler_fence,
100 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_kill_proc_info()
103 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_kill_proc_info()
139 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_send_sig_info()
142 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_send_sig_info()
230 compiler_fence(core::sync::atomic::Ordering::SeqCst); in __send_signal_locked()
253 compiler_fence(core::sync::atomic::Ordering::SeqCst); in __send_signal_locked()
271 compiler_fence(core::sync::atomic::Ordering::SeqCst); in complete_signal()
299 compiler_fence(core::sync::atomic::Ordering::SeqCst); in complete_signal()
380 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_wake_up_state()
[all …]
Dsyscall.rs3 sync::atomic::compiler_fence,
66 compiler_fence(core::sync::atomic::Ordering::SeqCst); in kill()
70 compiler_fence(core::sync::atomic::Ordering::SeqCst); in kill()
/DragonOS-0.1.8/kernel/src/driver/video/
Dmod.rs3 sync::atomic::{AtomicBool, Ordering},
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs1 use core::sync::atomic::AtomicI32;
128 let prev_ref_count = self.1.fetch_add(1, core::sync::atomic::Ordering::SeqCst); in open()
142 let prev_ref_count = self.1.fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in close()
/DragonOS-0.1.8/kernel/src/arch/x86_64/interrupt/
Dmod.rs7 sync::atomic::{compiler_fence, Ordering},
/DragonOS-0.1.8/kernel/src/net/
Dmod.rs3 sync::atomic::AtomicUsize,
27 .fetch_add(1, core::sync::atomic::Ordering::SeqCst) in generate_iface_id()

12