Home
last modified time | relevance | path

Searched refs:Ordering (Results 1 – 25 of 39) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/arch/x86_64/interrupt/
Dmod.rs7 sync::atomic::{compiler_fence, Ordering},
50 compiler_fence(Ordering::SeqCst); in save_and_disable_irq()
54 compiler_fence(Ordering::SeqCst); in save_and_disable_irq()
59 compiler_fence(Ordering::SeqCst); in restore_irq()
61 compiler_fence(Ordering::SeqCst); in restore_irq()
/DragonOS-0.1.8/kernel/src/time/
Dtimekeeping.rs2 use core::sync::atomic::{compiler_fence, AtomicBool, AtomicI64, Ordering};
178 let sec = __ADDED_SEC.load(Ordering::SeqCst); in getnstimeofday()
230 __ADDED_USEC.store(0, Ordering::SeqCst); in timekeeping_init()
231 __ADDED_SEC.store(0, Ordering::SeqCst); in timekeeping_init()
243 compiler_fence(Ordering::SeqCst); in update_wall_time()
246 if TIMEKEEPING_SUSPENDED.load(Ordering::SeqCst) { in update_wall_time()
267 compiler_fence(Ordering::SeqCst); in update_wall_time()
269 __ADDED_USEC.fetch_add(500, Ordering::SeqCst); in update_wall_time()
270 compiler_fence(Ordering::SeqCst); in update_wall_time()
273 let usec = __ADDED_USEC.load(Ordering::SeqCst); in update_wall_time()
[all …]
Dtimer.rs4 sync::atomic::{compiler_fence, AtomicBool, AtomicU64, Ordering},
97 compiler_fence(Ordering::SeqCst); in activate()
153 .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed); in set_run()
162 self.running.store(false, Ordering::Release); in clear_run()
197 if timer_list_front_guard.expire_jiffies > TIMER_JIFFIES.load(Ordering::SeqCst) { in run()
223 return TIMER_JIFFIES.load(Ordering::SeqCst) + 1000 * (expire_ms); in next_n_ms_timer_jiffies()
227 return TIMER_JIFFIES.load(Ordering::SeqCst) + (expire_us); in next_n_us_timer_jiffies()
249 timeout += TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
257 let time_remaining: i64 = timeout - TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
290 let prev = TIMER_JIFFIES.fetch_add(add_jiffies, Ordering::SeqCst); in update_timer_jiffies()
[all …]
/DragonOS-0.1.8/kernel/src/process/
Dmod.rs3 sync::atomic::{compiler_fence, Ordering},
26 compiler_fence(Ordering::SeqCst); in process_init()
34 compiler_fence(Ordering::SeqCst); in process_init()
36 compiler_fence(Ordering::SeqCst); in process_init()
Dfork.rs50 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()
/DragonOS-0.1.8/kernel/src/mm/
Dkernel_mapper.rs16 sync::atomic::{compiler_fence, AtomicUsize, Ordering},
40 Ordering::Acquire, in lock_cpu()
41 Ordering::Relaxed, in lock_cpu()
51 let prev_count = KERNEL_MAPPER_LOCK_COUNT.fetch_add(1, Ordering::Relaxed); in lock_cpu()
52 compiler_fence(Ordering::Acquire); in lock_cpu()
131 let prev_count = KERNEL_MAPPER_LOCK_COUNT.fetch_sub(1, Ordering::Relaxed); in drop()
133 KERNEL_MAPPER_LOCK_OWNER.store(KERNEL_MAPPER_NO_PROCESSOR, Ordering::Release); in drop()
136 compiler_fence(Ordering::Release); in drop()
Dpercpu.rs28 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/kernel/src/libs/
Drwlock.rs7 sync::atomic::{AtomicU32, Ordering},
100 let value = self.lock.fetch_add(READER, Ordering::Acquire); in current_reader()
104 self.lock.fetch_sub(READER, Ordering::Release); in current_reader()
138 self.lock.fetch_sub(READER, Ordering::Release); in inner_try_read()
164 let state = self.lock.load(Ordering::Relaxed); in reader_count()
172 return (self.lock.load(Ordering::Relaxed) & WRITER) / WRITER; in writer_count()
194 .compare_exchange(0, WRITER, Ordering::Acquire, Ordering::Relaxed) in inner_try_write()
235 if self.lock.fetch_or(UPGRADED, Ordering::Acquire) & (WRITER | UPGRADED) == 0 { in inner_try_upgradeable_read()
262 debug_assert!(self.lock.load(Ordering::Relaxed) & !WRITER > 0); in force_read_decrement()
263 self.lock.fetch_sub(READER, Ordering::Release); in force_read_decrement()
[all …]
Dsemaphore.rs1 use core::sync::atomic::{AtomicI32, Ordering};
35 if self.counter.fetch_sub(1, Ordering::Release) <= 0 { in down()
36 self.counter.fetch_add(1, Ordering::Relaxed); in down()
47 self.counter.fetch_add(1, Ordering::Release); in up()
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,
Dspinlock.rs7 use core::sync::atomic::{AtomicBool, Ordering};
94 .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed) in try_lock()
108 self.0.store(false, Ordering::Release); in unlock()
113 self.0.store(false, Ordering::Release); in unlock_no_preempt()
127 return self.0.load(Ordering::Relaxed).into(); in is_locked()
133 self.0.store(value, Ordering::SeqCst); in set_value()
Dlazy_init.rs23 use core::sync::atomic::{AtomicBool, Ordering};
51 let initialized = self.initialized.load(Ordering::Acquire); in initialized()
81 self.initialized.store(true, Ordering::Release); in init()
Dprintk.rs11 sync::atomic::{AtomicBool, Ordering},
142 return ALLOW_ALLOC_ATOMIC.load(Ordering::SeqCst); in allow_alloc()
148 ALLOW_ALLOC_ATOMIC.store(true, Ordering::SeqCst); in enable_alloc()
/DragonOS-0.1.8/kernel/src/driver/video/
Dmod.rs3 sync::atomic::{AtomicBool, Ordering},
41 .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed); in set_run()
50 self.running.store(false, Ordering::Release); in clear_run()
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dmod.rs53 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()
171 compiler_fence(core::sync::atomic::Ordering::SeqCst); in get_disks_by_name()
[all …]
Dahcidisk.rs59 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()
/DragonOS-0.1.8/kernel/src/exception/
Dsoftirq.rs6 sync::atomic::{compiler_fence, Ordering},
149 compiler_fence(Ordering::SeqCst); in register_softirq()
165 compiler_fence(Ordering::SeqCst); in unregister_softirq()
167 compiler_fence(Ordering::SeqCst); in unregister_softirq()
177 compiler_fence(Ordering::SeqCst); in do_softirq()
180 compiler_fence(Ordering::SeqCst); in do_softirq()
212 compiler_fence(Ordering::SeqCst); in do_softirq()
214 compiler_fence(Ordering::SeqCst); in do_softirq()
233 compiler_fence(Ordering::SeqCst); in raise_softirq()
239 compiler_fence(Ordering::SeqCst); in clear_softirq_pending()
[all …]
/DragonOS-0.1.8/kernel/src/sched/
Dcfs.rs192 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.rs76 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()
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dcurrent.rs12 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/arch/x86_64/mm/
Dmod.rs35 use core::sync::atomic::{compiler_fence, AtomicBool, Ordering};
158 compiler_fence(Ordering::SeqCst); in invalidate_page()
160 compiler_fence(Ordering::SeqCst); in invalidate_page()
165 compiler_fence(Ordering::SeqCst); in invalidate_all()
168 compiler_fence(Ordering::SeqCst); in invalidate_all()
174 compiler_fence(Ordering::SeqCst); in table()
176 compiler_fence(Ordering::SeqCst); in table()
182 compiler_fence(Ordering::SeqCst); in set_table()
184 compiler_fence(Ordering::SeqCst); in set_table()
270 XD_RESERVED.store(true, Ordering::Relaxed); in init_xd_rsvd()
[all …]
/DragonOS-0.1.8/kernel/src/arch/x86_64/
Dcontext.rs18 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/docs/kernel/core_api/
Dsoftirq.md134 .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed);
143 self.running.store(false, Ordering::Release);
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal.rs100 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()
385 compiler_fence(core::sync::atomic::Ordering::SeqCst); in signal_wake_up_state()
[all …]
/DragonOS-0.1.8/kernel/src/driver/base/char/
Dmod.rs7 use core::cmp::Ordering;
218 Ordering::Less => continue, in __register_chardev_region()
219 Ordering::Greater => { in __register_chardev_region()
222 Ordering::Equal => { in __register_chardev_region()

12