Home
last modified time | relevance | path

Searched refs:AtomicUsize (Results 1 – 25 of 165) sorted by relevance

1234567

/external/rust/crates/tokio/src/loom/std/
Datomic_usize.rs6 pub(crate) struct AtomicUsize { struct
7 inner: UnsafeCell<std::sync::atomic::AtomicUsize>, argument
10 unsafe impl Send for AtomicUsize {} implementation
11 unsafe impl Sync for AtomicUsize {} implementation
13 impl AtomicUsize { impl
14 pub(crate) const fn new(val: usize) -> AtomicUsize { in new() argument
15 let inner = UnsafeCell::new(std::sync::atomic::AtomicUsize::new(val)); in new()
16 AtomicUsize { inner } in new()
35 impl ops::Deref for AtomicUsize { implementation
36 type Target = std::sync::atomic::AtomicUsize;
[all …]
/external/rust/crates/parking_lot_core/src/thread_parker/windows/
Dwaitaddress.rs10 sync::atomic::{AtomicUsize, Ordering},
67 pub fn prepare_park(&'static self, key: &AtomicUsize) { in prepare_park() argument
72 pub fn timed_out(&'static self, key: &AtomicUsize) -> bool { in timed_out()
77 pub fn park(&'static self, key: &AtomicUsize) { in park() argument
85 pub fn park_until(&'static self, key: &AtomicUsize, timeout: Instant) -> bool { in park_until() argument
112 pub fn unpark_lock(&'static self, key: &AtomicUsize) -> UnparkHandle { in unpark_lock()
123 fn wait_on_address(&'static self, key: &AtomicUsize, timeout: DWORD) -> BOOL { in wait_on_address() argument
138 key: *const AtomicUsize,
Dkeyed_event.rs13 use std::sync::atomic::{AtomicUsize, Ordering};
112 pub fn prepare_park(&'static self, key: &AtomicUsize) { in prepare_park() argument
117 pub fn timed_out(&'static self, key: &AtomicUsize) -> bool { in timed_out()
122 pub unsafe fn park(&'static self, key: &AtomicUsize) { in park() argument
128 pub unsafe fn park_until(&'static self, key: &AtomicUsize, timeout: Instant) -> bool { in park_until() argument
174 pub unsafe fn unpark_lock(&'static self, key: &AtomicUsize) -> UnparkHandle { in unpark_lock()
204 key: *const AtomicUsize,
/external/rust/crates/async-task/tests/
Dcancel.rs3 use std::sync::atomic::{AtomicUsize, Ordering};
22 static $poll: AtomicUsize = AtomicUsize::new(0);
23 static $drop_f: AtomicUsize = AtomicUsize::new(0);
24 static $drop_t: AtomicUsize = AtomicUsize::new(0);
70 static $drop: AtomicUsize = AtomicUsize::new(0);
71 static $sched: AtomicUsize = AtomicUsize::new(0);
Dready.rs3 use std::sync::atomic::{AtomicUsize, Ordering};
22 static $poll: AtomicUsize = AtomicUsize::new(0);
23 static $drop_f: AtomicUsize = AtomicUsize::new(0);
24 static $drop_t: AtomicUsize = AtomicUsize::new(0);
70 static $drop: AtomicUsize = AtomicUsize::new(0);
71 static $sched: AtomicUsize = AtomicUsize::new(0);
Dbasic.rs3 use std::sync::atomic::{AtomicUsize, Ordering};
18 static $poll: AtomicUsize = AtomicUsize::new(0);
19 static $drop: AtomicUsize = AtomicUsize::new(0);
53 static $drop: AtomicUsize = AtomicUsize::new(0);
54 static $sched: AtomicUsize = AtomicUsize::new(0);
250 static COUNT: AtomicUsize = AtomicUsize::new(0); in schedule_counter()
268 struct DropGuard(AtomicUsize); in drop_inside_schedule()
274 let guard = DropGuard(AtomicUsize::new(0)); in drop_inside_schedule()
Dpanic.rs4 use std::sync::atomic::{AtomicUsize, Ordering};
22 static $poll: AtomicUsize = AtomicUsize::new(0);
23 static $drop: AtomicUsize = AtomicUsize::new(0);
58 static $drop: AtomicUsize = AtomicUsize::new(0);
59 static $sched: AtomicUsize = AtomicUsize::new(0);
/external/rust/crates/crossbeam-epoch/src/
Dcollector.rs115 use std::sync::atomic::{AtomicUsize, Ordering};
206 static DESTROYS: AtomicUsize = AtomicUsize::new(0); in incremental()
239 static DESTROYS: AtomicUsize = AtomicUsize::new(0); in buffering()
272 static DROPS: AtomicUsize = AtomicUsize::new(0); in count_drops()
305 static DESTROYS: AtomicUsize = AtomicUsize::new(0); in count_destroy()
333 static DROPS: AtomicUsize = AtomicUsize::new(0); in drop_array()
371 static DESTROYS: AtomicUsize = AtomicUsize::new(0); in destroy_array()
406 static DROPS: AtomicUsize = AtomicUsize::new(0); in stress()
/external/rust/crates/tokio/src/runtime/thread_pool/
Didle.rs3 use crate::loom::sync::atomic::AtomicUsize;
14 state: AtomicUsize,
35 state: AtomicUsize::new(init.into()), in new()
150 fn load(cell: &AtomicUsize, ordering: Ordering) -> State { in load() argument
154 fn unpark_one(cell: &AtomicUsize) { in unpark_one() argument
158 fn inc_num_searching(cell: &AtomicUsize, ordering: Ordering) { in inc_num_searching() argument
163 fn dec_num_searching(cell: &AtomicUsize) -> bool { in dec_num_searching()
171 fn dec_num_unparked(cell: &AtomicUsize, is_searching: bool) -> bool { in dec_num_unparked() argument
/external/rust/crates/rayon/tests/
Dsort-panic-safe.rs7 use std::sync::atomic::AtomicUsize;
11 static VERSIONS: AtomicUsize = AtomicUsize::new(0);
14 static ref DROP_COUNTS: Vec<AtomicUsize> = (0..20_000).map(|_| AtomicUsize::new(0)).collect();
58 let count = AtomicUsize::new(0);
82 let panic_countdown = AtomicUsize::new(panic_countdown);
Dcollect.rs4 use std::sync::atomic::AtomicUsize;
65 static INSERTS: AtomicUsize = AtomicUsize::new(0); in collect_drop_on_unwind_zst()
66 static DROPS: AtomicUsize = AtomicUsize::new(0); in collect_drop_on_unwind_zst()
/external/rust/crates/crossbeam-utils/src/atomic/
Dseq_lock_wide.rs2 use core::sync::atomic::{self, AtomicUsize, Ordering};
12 state_hi: AtomicUsize,
18 state_lo: AtomicUsize,
24 state_hi: AtomicUsize::new(0), in new()
25 state_lo: AtomicUsize::new(0), in new()
/external/rust/crates/rayon-core/src/scope/
Dtest.rs8 use std::sync::atomic::{AtomicUsize, Ordering};
25 let counter = &AtomicUsize::new(0); in scope_two()
41 let counter_p = &AtomicUsize::new(0); in scope_divide_and_conquer()
44 let counter_s = &AtomicUsize::new(0); in scope_divide_and_conquer()
52 fn divide_and_conquer<'scope>(scope: &Scope<'scope>, counter: &'scope AtomicUsize, size: usize) { in divide_and_conquer() argument
62 fn divide_and_conquer_seq(counter: &AtomicUsize, size: usize) { in divide_and_conquer_seq() argument
439 static COUNTER: AtomicUsize = AtomicUsize::new(0); in static_scope()
461 static COUNTER: AtomicUsize = AtomicUsize::new(0); in static_scope_fifo()
483 fn increment<'slice, 'counter>(counters: &'slice [&'counter AtomicUsize]) { in mixed_lifetime_scope() argument
494 let counter = AtomicUsize::new(0); in mixed_lifetime_scope()
[all …]
/external/rust/crates/rayon/src/iter/find_first_last/
Dtest.rs2 use std::sync::atomic::AtomicUsize;
7 let first_found = AtomicUsize::new(usize::max_value()); in same_range_first_consumers_return_correct_answer()
43 let last_found = AtomicUsize::new(0); in same_range_last_consumers_return_correct_answer()
81 let best_found = AtomicUsize::new(usize::max_value()); in find_first_folder_does_not_clobber_first_found()
96 let best_found = AtomicUsize::new(0); in find_last_folder_yields_last_match()
Dmod.rs4 use std::sync::atomic::{AtomicUsize, Ordering};
46 let best_found = AtomicUsize::new(usize::max_value()); in find_first()
56 let best_found = AtomicUsize::new(0); in find_last()
66 best_found: &'p AtomicUsize,
70 fn new(find_op: &'p P, match_position: MatchPosition, best_found: &'p AtomicUsize) -> Self { in new()
170 best_found: &'p AtomicUsize,
/external/rust/crates/tokio/tests/
Drt_threaded.rs13 use std::sync::atomic::AtomicUsize;
36 let cnt = Arc::new(AtomicUsize::new(0)); in many_oneshot_futures()
167 let num_inc = Arc::new(AtomicUsize::new(0)); in drop_threadpool_drops_futures()
168 let num_dec = Arc::new(AtomicUsize::new(0)); in drop_threadpool_drops_futures()
169 let num_drop = Arc::new(AtomicUsize::new(0)); in drop_threadpool_drops_futures()
171 struct Never(Arc<AtomicUsize>); in drop_threadpool_drops_futures()
222 use std::sync::atomic::{AtomicUsize, Ordering}; in start_stop_callbacks_called()
224 let after_start = Arc::new(AtomicUsize::new(0)); in start_stop_callbacks_called()
225 let before_stop = Arc::new(AtomicUsize::new(0)); in start_stop_callbacks_called()
263 let cnt = Arc::new(AtomicUsize::new(0)); in blocking()
/external/rust/crates/spin/src/mutex/
Dticket.rs5 sync::atomic::{AtomicUsize, Ordering},
63 pub(crate) next_ticket: AtomicUsize,
64 pub(crate) next_serving: AtomicUsize,
72 next_serving: &'a AtomicUsize,
99 next_ticket: AtomicUsize::new(0), in new()
100 next_serving: AtomicUsize::new(0), in new()
318 use std::sync::atomic::{AtomicUsize, Ordering};
398 struct Foo(Arc<AtomicUsize>); in test_into_inner_drop()
404 let num_drops = Arc::new(AtomicUsize::new(0)); in test_into_inner_drop()
/external/rust/crates/crossbeam-channel/src/
Dcounter.rs6 use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
11 senders: AtomicUsize,
14 receivers: AtomicUsize,
26 senders: AtomicUsize::new(1), in new()
27 receivers: AtomicUsize::new(1), in new()
Dcontext.rs4 use std::sync::atomic::{AtomicUsize, Ordering};
23 select: AtomicUsize,
26 packet: AtomicUsize,
71 select: AtomicUsize::new(Selected::Waiting.into()), in new()
72 packet: AtomicUsize::new(0), in new()
/external/rust/crates/tokio/src/sync/
Doneshot.rs56 use crate::loom::sync::atomic::AtomicUsize;
175 state: AtomicUsize,
255 state: AtomicUsize::new(State::new().as_usize()), in channel()
808 fn mut_load(this: &mut AtomicUsize) -> usize { in mut_load()
854 fn set_complete(cell: &AtomicUsize) -> State { in set_complete()
866 fn set_rx_task(cell: &AtomicUsize) -> State { in set_rx_task()
871 fn unset_rx_task(cell: &AtomicUsize) -> State { in unset_rx_task()
880 fn set_closed(cell: &AtomicUsize) -> State { in set_closed()
887 fn set_tx_task(cell: &AtomicUsize) -> State { in set_tx_task()
892 fn unset_tx_task(cell: &AtomicUsize) -> State { in unset_tx_task()
[all …]
/external/rust/crates/once_cell/tests/
Dit.rs4 sync::atomic::{AtomicUsize, Ordering::SeqCst},
31 static DROP_CNT: AtomicUsize = AtomicUsize::new(0); in once_cell_drop()
135 static CALLED: AtomicUsize = AtomicUsize::new(0); in lazy_default()
212 use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
253 static DROP_CNT: AtomicUsize = AtomicUsize::new(0); in once_cell_drop()
380 let called = AtomicUsize::new(0); in lazy_new()
404 let called = AtomicUsize::new(0); in lazy_deref_mut()
423 static CALLED: AtomicUsize = AtomicUsize::new(0); in lazy_default()
597 atomic::{AtomicUsize, Ordering::SeqCst},
608 let cnt = AtomicUsize::new(0); in once_non_zero_usize_smoke_test()
[all …]
/external/rust/crates/crossbeam-epoch/examples/
Dsanitize.rs1 use std::sync::atomic::AtomicUsize;
10 fn worker(a: Arc<Atomic<AtomicUsize>>, handle: LocalHandle) -> usize { in worker() argument
26 let p = a.swap(Owned::new(AtomicUsize::new(sum)), AcqRel, guard); in worker()
47 let a = Arc::new(Atomic::new(AtomicUsize::new(777))); in main()
/external/rust/crates/getrandom/src/
Dutil.rs9 use core::sync::atomic::{AtomicUsize, Ordering::Relaxed};
29 pub struct LazyUsize(AtomicUsize);
33 Self(AtomicUsize::new(Self::UNINIT)) in new()
/external/rust/crates/protobuf/src/
Dcached_size.rs1 use std::sync::atomic::AtomicUsize;
9 size: AtomicUsize,
27 size: AtomicUsize::new(self.size.load(Ordering::Relaxed)), in clone()
/external/rust/crates/crossbeam-utils/tests/
Datomic_cell.rs1 use std::sync::atomic::AtomicUsize;
33 static CNT: AtomicUsize = AtomicUsize::new(0); in drops_unit()
75 static CNT: AtomicUsize = AtomicUsize::new(0); in drops_u8()
121 static CNT: AtomicUsize = AtomicUsize::new(0); in drops_usize()

1234567