Home
last modified time | relevance | path

Searched refs:Relaxed (Results 1 – 25 of 170) sorted by relevance

1234567

/external/rust/crates/parking_lot/src/
Draw_rwlock.rs71 .compare_exchange_weak(0, WRITER_BIT, Ordering::Acquire, Ordering::Relaxed) in lock_exclusive()
84 .compare_exchange(0, WRITER_BIT, Ordering::Acquire, Ordering::Relaxed) in try_lock_exclusive()
99 .compare_exchange(WRITER_BIT, 0, Ordering::Release, Ordering::Relaxed) in unlock_exclusive()
144 let state = self.state.load(Ordering::Relaxed); in is_locked()
161 .compare_exchange(WRITER_BIT, 0, Ordering::Release, Ordering::Relaxed) in unlock_exclusive_fair()
171 if self.state.load(Ordering::Relaxed) & (READERS_MASK | WRITER_BIT) in bump_shared()
180 if self.state.load(Ordering::Relaxed) & PARKED_BIT != 0 { in bump_exclusive()
234 .compare_exchange_weak(0, WRITER_BIT, Ordering::Acquire, Ordering::Relaxed) in try_lock_exclusive_for()
251 .compare_exchange_weak(0, WRITER_BIT, Ordering::Acquire, Ordering::Relaxed) in try_lock_exclusive_until()
343 let state = self.state.load(Ordering::Relaxed); in unlock_upgradable()
[all …]
Draw_mutex.rs69 .compare_exchange_weak(0, LOCKED_BIT, Ordering::Acquire, Ordering::Relaxed) in lock()
79 let mut state = self.state.load(Ordering::Relaxed); in try_lock()
88 Ordering::Relaxed, in try_lock()
104 .compare_exchange(LOCKED_BIT, 0, Ordering::Release, Ordering::Relaxed) in unlock()
114 let state = self.state.load(Ordering::Relaxed); in is_locked()
125 .compare_exchange(LOCKED_BIT, 0, Ordering::Release, Ordering::Relaxed) in unlock_fair()
135 if self.state.load(Ordering::Relaxed) & PARKED_BIT != 0 { in bump()
149 .compare_exchange_weak(0, LOCKED_BIT, Ordering::Acquire, Ordering::Relaxed) in try_lock_until()
166 .compare_exchange_weak(0, LOCKED_BIT, Ordering::Acquire, Ordering::Relaxed) in try_lock_for()
185 let mut state = self.state.load(Ordering::Relaxed); in mark_parked_if_locked()
[all …]
/external/rust/crates/crossbeam-epoch/src/
Dcollector.rs190 let before = collector.global.epoch.load(Ordering::Relaxed); in pin_holds_advance()
192 let after = collector.global.epoch.load(Ordering::Relaxed); in pin_holds_advance()
217 DESTROYS.fetch_add(1, Ordering::Relaxed); in incremental()
226 let curr = DESTROYS.load(Ordering::Relaxed); in incremental()
233 assert!(DESTROYS.load(Ordering::Relaxed) == 100_000); in incremental()
250 DESTROYS.fetch_add(1, Ordering::Relaxed); in buffering()
258 assert!(DESTROYS.load(Ordering::Relaxed) < COUNT); in buffering()
262 while DESTROYS.load(Ordering::Relaxed) < COUNT { in buffering()
266 assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT); in buffering()
278 DROPS.fetch_add(1, Ordering::Relaxed); in count_drops()
[all …]
Dinternal.rs266 let epoch = self.epoch.load(Ordering::Relaxed); in push_bag()
308 let global_epoch = self.epoch.load(Ordering::Relaxed); in try_advance()
323 let local_epoch = local.epoch.load(Ordering::Relaxed); in try_advance()
465 let global_epoch = self.global().epoch.load(Ordering::Relaxed); in pin()
498 self.epoch.store(new_epoch, Ordering::Relaxed); in pin()
538 let epoch = self.epoch.load(Ordering::Relaxed); in repin()
539 let global_epoch = self.global().epoch.load(Ordering::Relaxed).pinned(); in repin()
639 FLAG.store(42, Ordering::Relaxed); in check_defer()
643 assert_eq!(FLAG.load(Ordering::Relaxed), 0); in check_defer()
645 assert_eq!(FLAG.load(Ordering::Relaxed), 42); in check_defer()
[all …]
/external/rust/crates/rayon/tests/
Dsort-panic-safe.rs8 use std::sync::atomic::Ordering::Relaxed;
34 VERSIONS.fetch_add(2, Relaxed); in partial_cmp()
47 DROP_COUNTS[self.id].fetch_add(1, Relaxed); in drop()
48 VERSIONS.fetch_sub(self.version.get(), Relaxed); in drop()
60 count.fetch_add(1, Relaxed);
64 let mut panic_countdown = count.load(Relaxed);
74 VERSIONS.store(0, Relaxed);
76 DROP_COUNTS[i].store(0, Relaxed);
84 if panic_countdown.fetch_sub(1, Relaxed) == 1 {
96 let count = c.load(Relaxed);
[all …]
/external/libchromeos-rs/src/sync/
Dmu.rs208 .compare_exchange_weak(0, LOCKED, Ordering::Acquire, Ordering::Relaxed) in lock()
222 Ordering::Relaxed, in lock()
236 .compare_exchange_weak(0, READ_LOCK, Ordering::Acquire, Ordering::Relaxed) in read_lock()
247 Ordering::Relaxed, in read_lock()
268 let oldstate = self.state.load(Ordering::Relaxed); in lock_slow()
278 Ordering::Relaxed, in lock_slow()
296 Ordering::Relaxed, in lock_slow()
332 Ordering::Relaxed, in lock_slow()
434 let oldstate = self.state.load(Ordering::Relaxed); in unlock_slow()
447 Ordering::Relaxed, in unlock_slow()
[all …]
Dcv.rs161 let mut oldstate = self.state.load(Ordering::Relaxed); in add_waiter()
170 oldstate = self.state.load(Ordering::Relaxed); in add_waiter()
204 let mut oldstate = self.state.load(Ordering::Relaxed); in notify_one()
217 oldstate = self.state.load(Ordering::Relaxed); in notify_one()
267 let mut oldstate = self.state.load(Ordering::Relaxed); in notify_all()
280 oldstate = self.state.load(Ordering::Relaxed); in notify_all()
315 let mut oldstate = self.state.load(Ordering::Relaxed); in cancel_waiter()
323 Ordering::Relaxed, in cancel_waiter()
328 oldstate = self.state.load(Ordering::Relaxed); in cancel_waiter()
752 assert_eq!(cv.state.load(Ordering::Relaxed), 0); in notify_one_with_cancel()
[all …]
/external/crosvm/cros_async/src/sync/
Dmu.rs206 .compare_exchange_weak(0, LOCKED, Ordering::Acquire, Ordering::Relaxed) in lock()
220 Ordering::Relaxed, in lock()
234 .compare_exchange_weak(0, READ_LOCK, Ordering::Acquire, Ordering::Relaxed) in read_lock()
245 Ordering::Relaxed, in read_lock()
266 let oldstate = self.state.load(Ordering::Relaxed); in lock_slow()
276 Ordering::Relaxed, in lock_slow()
294 Ordering::Relaxed, in lock_slow()
330 Ordering::Relaxed, in lock_slow()
432 let oldstate = self.state.load(Ordering::Relaxed); in unlock_slow()
445 Ordering::Relaxed, in unlock_slow()
[all …]
Dcv.rs162 let mut oldstate = self.state.load(Ordering::Relaxed); in add_waiter()
170 Ordering::Relaxed, in add_waiter()
175 oldstate = self.state.load(Ordering::Relaxed); in add_waiter()
209 let mut oldstate = self.state.load(Ordering::Relaxed); in notify_one()
222 Ordering::Relaxed, in notify_one()
227 oldstate = self.state.load(Ordering::Relaxed); in notify_one()
267 let mut oldstate = self.state.load(Ordering::Relaxed); in notify_all()
280 Ordering::Relaxed, in notify_all()
285 oldstate = self.state.load(Ordering::Relaxed); in notify_all()
310 let mut oldstate = self.state.load(Ordering::Relaxed); in cancel_waiter()
[all …]
/external/rust/crates/parking_lot_core/src/
Dword_lock.rs92 .compare_exchange_weak(0, LOCKED_BIT, Ordering::Acquire, Ordering::Relaxed) in lock()
113 let mut state = self.state.load(Ordering::Relaxed); in lock_slow()
121 Ordering::Relaxed, in lock_slow()
131 state = self.state.load(Ordering::Relaxed); in lock_slow()
158 Ordering::Relaxed, in lock_slow()
172 self.state.load(Ordering::Relaxed) in lock_slow()
179 let mut state = self.state.load(Ordering::Relaxed); in unlock_slow()
193 Ordering::Relaxed, in unlock_slow()
234 Ordering::Relaxed, in unlock_slow()
253 Ordering::Relaxed, in unlock_slow()
Dparking_lot.rs155 let num_threads = NUM_THREADS.fetch_add(1, Ordering::Relaxed) + 1; in new()
188 NUM_THREADS.fetch_sub(1, Ordering::Relaxed); in drop()
258 if HASHTABLE.load(Ordering::Relaxed) == table as *const _ as *mut _ { in grow_hashtable()
305 let hash = hash((*current).key.load(Ordering::Relaxed), table.hash_bits); in rehash_bucket_into()
346 if HASHTABLE.load(Ordering::Relaxed) == hashtable as *const _ as *mut _ { in lock_bucket()
363 let current_key = key.load(Ordering::Relaxed); in lock_bucket_checked()
374 if HASHTABLE.load(Ordering::Relaxed) == hashtable as *const _ as *mut _ in lock_bucket_checked()
375 && key.load(Ordering::Relaxed) == current_key in lock_bucket_checked()
411 if HASHTABLE.load(Ordering::Relaxed) == hashtable as *const _ as *mut _ { in lock_bucket_pair()
590 thread_data.key.store(key, Ordering::Relaxed); in park()
[all …]
/external/rust/crates/hashbrown/src/external_trait_impls/rayon/
Dmap.rs492 counter.fetch_add(1, Ordering::Relaxed); in new()
500 self.counter.fetch_sub(1, Ordering::Relaxed); in drop()
535 assert_eq!(key.load(Ordering::Relaxed), 0); in test_into_iter_drops()
536 assert_eq!(value.load(Ordering::Relaxed), 0); in test_into_iter_drops()
544 assert_eq!(key.load(Ordering::Relaxed), 100); in test_into_iter_drops()
545 assert_eq!(value.load(Ordering::Relaxed), 100); in test_into_iter_drops()
553 assert_eq!(key.load(Ordering::Relaxed), 100); in test_into_iter_drops()
554 assert_eq!(value.load(Ordering::Relaxed), 100); in test_into_iter_drops()
560 assert_eq!(key.load(Ordering::Relaxed), 100); in test_into_iter_drops()
561 assert_eq!(value.load(Ordering::Relaxed), 100); in test_into_iter_drops()
[all …]
/external/rust/crates/tokio/src/time/driver/
Dentry.rs121 self.state.load(Ordering::Relaxed) == STATE_PENDING_FIRE in is_pending()
126 let cur_state = self.state.load(Ordering::Relaxed); in when()
171 let mut cur_state = self.state.load(Ordering::Relaxed); in mark_pending()
210 let cur_state = self.state.load(Ordering::Relaxed); in fire()
237 self.state.store(timestamp, Ordering::Relaxed); in set_expiration()
247 let mut prior = self.state.load(Ordering::Relaxed); in extend_expiration()
274 self.state.load(Ordering::Relaxed) != u64::max_value() in might_be_registered()
351 self.driver_state.0.cached_when.load(Ordering::Relaxed) in cached_when()
365 .store(true_when, Ordering::Relaxed); in sync_when()
378 .store(when, Ordering::Relaxed); in set_cached_when()
[all …]
/external/rust/crates/tokio/tests/
Drt_threaded.rs14 use std::sync::atomic::Ordering::Relaxed;
43 let num = cnt.fetch_add(1, Relaxed) + 1; in many_oneshot_futures()
183 self.0.fetch_add(1, Relaxed); in drop_threadpool_drops_futures()
193 a.fetch_add(1, Relaxed); in drop_threadpool_drops_futures()
196 b.fetch_add(1, Relaxed); in drop_threadpool_drops_futures()
207 let a = num_inc.load(Relaxed); in drop_threadpool_drops_futures()
211 let b = num_dec.load(Relaxed); in drop_threadpool_drops_futures()
215 let c = num_drop.load(Relaxed); in drop_threadpool_drops_futures()
232 after_inner.clone().fetch_add(1, Ordering::Relaxed); in start_stop_callbacks_called()
235 before_inner.clone().fetch_add(1, Ordering::Relaxed); in start_stop_callbacks_called()
[all …]
/external/rust/crates/structopt/tests/
Dflags.rs94 assert!(!falsey.alice.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
95 assert!(!falsey.bob.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
98 assert!(alice.alice.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
99 assert!(!alice.bob.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
102 assert!(!bob.alice.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
103 assert!(bob.bob.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
106 assert!(both.alice.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
107 assert!(both.bob.load(std::sync::atomic::Ordering::Relaxed)); in non_bool_flags()
/external/rust/crates/crossbeam-epoch/tests/
Dloom.rs8 use loom::sync::atomic::Ordering::{self, Acquire, Relaxed, Release};
82 let head = self.head.load(Relaxed, &guard); in treiber_stack()
83 n.next.store(head, Relaxed); in treiber_stack()
87 .compare_exchange(head, n, Release, Relaxed, &guard) in treiber_stack()
105 let next = h.next.load(Relaxed, &guard); in treiber_stack()
109 .compare_exchange(head, next, Relaxed, Relaxed, &guard) in treiber_stack()
/external/rust/crates/crossbeam-deque/src/
Ddeque.rs122 let b = self.back.load(Ordering::Relaxed); in drop()
123 let f = self.front.load(Ordering::Relaxed); in drop()
126 let buffer = self.buffer.load(Ordering::Relaxed, epoch::unprotected()); in drop()
287 let b = self.inner.back.load(Ordering::Relaxed); in resize()
288 let f = self.inner.front.load(Ordering::Relaxed); in resize()
323 let b = self.inner.back.load(Ordering::Relaxed); in reserve()
358 let b = self.inner.back.load(Ordering::Relaxed); in is_empty()
377 let b = self.inner.back.load(Ordering::Relaxed); in len()
395 let b = self.inner.back.load(Ordering::Relaxed); in push()
442 let b = self.inner.back.load(Ordering::Relaxed); in pop()
[all …]
/external/rust/crates/crossbeam-utils/tests/
Dthread.rs18 counter.store(1, Ordering::Relaxed); in join()
30 assert_eq!(1, counter.load(Ordering::Relaxed)); in join()
39 counter.fetch_add(1, Ordering::Relaxed); in counter()
45 assert_eq!(THREADS, counter.load(Ordering::Relaxed)); in counter()
58 counter.fetch_add(1, Ordering::Relaxed); in counter_builder()
65 assert_eq!(THREADS, counter.load(Ordering::Relaxed)); in counter_builder()
81 counter.fetch_add(1, Ordering::Relaxed); in counter_panic()
86 assert_eq!(THREADS, counter.load(Ordering::Relaxed)); in counter_panic()
/external/rust/crates/crossbeam-epoch/src/sync/
Dqueue.rs12 use core::sync::atomic::Ordering::{Acquire, Relaxed, Release};
57 q.head.store(sentinel, Relaxed); in new()
58 q.tail.store(sentinel, Relaxed); in new()
79 .compare_exchange(onto, next, Release, Relaxed, guard); in push_internal()
85 .compare_exchange(Shared::null(), new, Release, Relaxed, guard) in push_internal()
91 .compare_exchange(onto, new, Release, Relaxed, guard); in push_internal()
125 .compare_exchange(head, next, Release, Relaxed, guard) in pop_internal()
127 let tail = self.tail.load(Relaxed, guard); in pop_internal()
132 .compare_exchange(tail, next, Release, Relaxed, guard); in pop_internal()
158 .compare_exchange(head, next, Release, Relaxed, guard) in pop_if_internal()
[all …]
/external/rust/crates/futures/tests/
Datomic_waker.rs25 if woken_copy.load(Ordering::Relaxed) == 1 { in basic()
33 returned_pending_copy.store(1, Ordering::Relaxed); in basic()
40 while returned_pending.load(Ordering::Relaxed) == 0 {} in basic()
45 woken.store(1, Ordering::Relaxed); in basic()
/external/rust/crates/futures-util/src/stream/futures_unordered/
Dmod.rs18 use core::sync::atomic::Ordering::{AcqRel, Acquire, Relaxed, Release, SeqCst};
157 self.head_all.load(Relaxed).is_null() in is_empty()
179 self.is_terminated.store(false, Relaxed); in push()
257 debug_assert_eq!(task.next_all.load(Relaxed), self.pending_next_all()); in release_task()
296 debug_assert_eq!(task.next_all.load(Relaxed), self.pending_next_all()); in link()
341 let next = task.next_all.load(Relaxed); in unlink()
343 task.next_all.store(self.pending_next_all(), Relaxed); in unlink()
351 (*prev).next_all.store(next, Relaxed); in unlink()
473 task.next_all.load(Relaxed), in poll_next()
620 self.is_terminated.load(Relaxed) in is_terminated()
/external/rust/crates/rayon/src/iter/
Dfind.rs48 self.found.load(Ordering::Relaxed) in full()
80 self.found.store(true, Ordering::Relaxed); in consume()
91 move |_| !found.load(Ordering::Relaxed) in consume_iter()
100 self.found.store(true, Ordering::Relaxed) in consume_iter()
110 self.found.load(Ordering::Relaxed) in full()
Dwhile_some.rs85 self.full.load(Ordering::Relaxed) || self.base.full() in full()
120 None => self.full.store(true, Ordering::Relaxed), in consume()
131 Some(_) => !full.load(Ordering::Relaxed), in consume_iter()
133 full.store(true, Ordering::Relaxed); in consume_iter()
152 self.full.load(Ordering::Relaxed) || self.base.full() in full()
/external/rust/crates/getrandom/src/
Dutil.rs9 use core::sync::atomic::{AtomicUsize, Ordering::Relaxed};
44 let mut val = self.0.load(Relaxed); in unsync_init()
47 self.0.store(val, Relaxed); in unsync_init()
/external/llvm-project/llvm/lib/MCA/
DCodeEmitter.cpp26 MCInst Relaxed(Sequence[MCID]); in getOrCreateEncodingInfo() local
28 MAB.relaxInstruction(Relaxed, STI); in getOrCreateEncodingInfo()
31 MCE.encodeInstruction(Relaxed, VecOS, Fixups, STI); in getOrCreateEncodingInfo()

1234567