Home
last modified time | relevance | path

Searched refs:Arc (Results 1 – 25 of 398) sorted by relevance

12345678910>>...16

/external/crosvm/cros_async/src/sync/
Dcv.rs8 use std::sync::Arc;
117 let waiter = Arc::new(Waiter::new( in wait()
141 let waiter = Arc::new(Waiter::new( in wait_read()
160 fn add_waiter(&self, waiter: Arc<Waiter>, raw_mutex: &RawMutex) { in add_waiter()
449 use std::sync::Arc;
465 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
477 let mu = Arc::new(Mutex::new(())); in notify_one()
478 let cv = Arc::new(Condvar::new()); in notify_one()
497 let mu = Arc::new(Mutex::new(false)); in multi_mutex()
498 let cv = Arc::new(Condvar::new()); in multi_mutex()
[all …]
Dmu.rs9 use std::sync::Arc;
68 fn new_waiter(raw: &RawMutex) -> Arc<Waiter>; in new_waiter()
92 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
93 Arc::new(Waiter::new( in new_waiter()
123 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
124 Arc::new(Waiter::new( in new_waiter()
890 use std::sync::Arc;
909 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
992 let arc = Arc::new(Mutex::new(mu)); in arc_nested()
1004 let arc = Arc::new(Mutex::new(1)); in arc_access_in_unwind()
[all …]
/external/libchromeos-rs/src/sync/
Dcv.rs8 use std::sync::Arc;
116 let waiter = Arc::new(Waiter::new( in wait()
140 let waiter = Arc::new(Waiter::new( in wait_read()
159 fn add_waiter(&self, waiter: Arc<Waiter>, raw_mutex: &RawMutex) { in add_waiter()
484 use std::sync::Arc;
500 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
512 let mu = Arc::new(Mutex::new(())); in notify_one()
513 let cv = Arc::new(Condvar::new()); in notify_one()
532 let mu = Arc::new(Mutex::new(false)); in multi_mutex()
533 let cv = Arc::new(Condvar::new()); in multi_mutex()
[all …]
Dmu.rs9 use std::sync::Arc;
70 fn new_waiter(raw: &RawMutex) -> Arc<Waiter>; in new_waiter()
94 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
95 Arc::new(Waiter::new( in new_waiter()
125 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
126 Arc::new(Waiter::new( in new_waiter()
1013 use std::sync::Arc;
1032 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
1115 let arc = Arc::new(Mutex::new(mu)); in arc_nested()
1127 let arc = Arc::new(Mutex::new(1)); in arc_access_in_unwind()
[all …]
/external/crosvm/devices/src/usb/host_backend/
Dhost_backend_device_provider.rs6 use std::sync::Arc;
32 Started { inner: Arc<ProviderInner> },
55 fail_handle: Arc<dyn FailHandle>, in start_helper()
56 event_loop: Arc<EventLoop>, in start_helper()
57 hub: Arc<UsbHub>, in start_helper()
63 let inner = Arc::new(ProviderInner::new( in start_helper()
70 let handler: Arc<dyn EventHandler> = inner.clone(); in start_helper()
75 Arc::downgrade(&handler), in start_helper()
96 fail_handle: Arc<dyn FailHandle>, in start()
97 event_loop: Arc<EventLoop>, in start()
[all …]
/external/rust/crates/futures/tests/
Darc_wake.rs3 use std::sync::{Arc, Mutex};
22 fn wake_by_ref(arc_self: &Arc<Self>) { in wake_by_ref()
30 let some_w = Arc::new(CountingWaker::new()); in create_from_arc()
33 assert_eq!(2, Arc::strong_count(&some_w)); in create_from_arc()
38 assert_eq!(3, Arc::strong_count(&some_w)); in create_from_arc()
44 assert_eq!(2, Arc::strong_count(&some_w)); in create_from_arc()
46 assert_eq!(1, Arc::strong_count(&some_w)); in create_from_arc()
51 let some_w = Arc::new(CountingWaker::new()); in ref_wake_same()
65 use std::sync::Arc; in proper_refcount_on_wake_panic()
70 fn wake_by_ref(_arc_self: &Arc<Self>) { in proper_refcount_on_wake_panic()
[all …]
/external/llvm-project/llvm/unittests/IR/
DCFGBuilder.h55 struct Arc { struct
59 friend bool operator<(const Arc &LHS, const Arc &RHS) { argument
68 Arc Edge;
71 CFGBuilder(Function *F, const std::vector<Arc> &InitialArcs,
80 void buildCFG(const std::vector<Arc> &Arcs);
81 bool connect(const Arc &A);
82 bool disconnect(const Arc &A);
87 std::set<Arc> Arcs;
/external/rust/crates/parking_lot/src/
Ddeadlock.rs44 use std::sync::{Arc, Barrier};
60 let m1: Arc<Mutex<()>> = Default::default(); in test_mutex_deadlock()
61 let m2: Arc<Mutex<()>> = Default::default(); in test_mutex_deadlock()
62 let m3: Arc<Mutex<()>> = Default::default(); in test_mutex_deadlock()
63 let b = Arc::new(Barrier::new(4)); in test_mutex_deadlock()
105 let m1: Arc<Mutex<()>> = Default::default(); in test_mutex_deadlock_reentrant()
124 let m1: Arc<ReentrantMutex<()>> = Default::default(); in test_remutex_deadlock()
125 let m2: Arc<ReentrantMutex<()>> = Default::default(); in test_remutex_deadlock()
126 let m3: Arc<ReentrantMutex<()>> = Default::default(); in test_remutex_deadlock()
127 let b = Arc::new(Barrier::new(4)); in test_remutex_deadlock()
[all …]
Dcondvar.rs419 use std::sync::Arc;
432 let m = Arc::new(Mutex::new(())); in notify_one()
434 let c = Arc::new(Condvar::new()); in notify_one()
449 let data = Arc::new((Mutex::new(0), Condvar::new())); in notify_all()
483 let m = Arc::new(Mutex::new(())); in notify_one_return_true()
485 let c = Arc::new(Condvar::new()); in notify_one_return_true()
498 let m = Arc::new(Mutex::new(())); in notify_one_return_false()
499 let c = Arc::new(Condvar::new()); in notify_one_return_false()
511 let data = Arc::new((Mutex::new(0), Condvar::new())); in notify_all_return()
547 let m = Arc::new(Mutex::new(())); in wait_for()
[all …]
/external/rust/crates/mio/src/sys/windows/
Dselector.rs22 use std::sync::{Arc, Mutex};
32 cp: Arc<CompletionPort>,
33 afd_group: Mutex<Vec<Arc<Afd>>>,
37 pub fn new(cp: Arc<CompletionPort>) -> AfdGroup { in new()
46 afd_group.retain(|g| Arc::strong_count(&g) > 1); in release_unused_afd()
54 pub fn acquire(&self) -> io::Result<Arc<Afd>> {
60 if Arc::strong_count(afd_group.last().unwrap()) >= POLL_GROUP__MAX_GROUP_SIZE + 1 {
74 fn _alloc_afd_group(&self, afd_group: &mut Vec<Arc<Afd>>) -> io::Result<()> {
76 let arc = Arc::new(afd);
94 afd: Arc<Afd>,
[all …]
/external/rust/crates/intrusive-collections/src/
Dpointer_ops.rs13 use crate::alloc::sync::Arc;
135 unsafe impl<T: ?Sized> PointerOps for DefaultPointerOps<Arc<T>> {
137 type Pointer = Arc<T>;
140 unsafe fn from_raw(&self, raw: *const T) -> Arc<T> { in from_raw()
141 Arc::from_raw(raw) in from_raw()
145 fn into_raw(&self, ptr: Arc<T>) -> *const T { in into_raw()
146 Arc::into_raw(ptr) in into_raw()
196 use std::sync::Arc;
229 let pointer_ops = DefaultPointerOps::<Arc<_>>::new(); in test_arc()
230 let p = Arc::new(1); in test_arc()
[all …]
/external/rust/crates/tokio/src/util/
Dwake.rs4 use std::sync::Arc;
10 fn wake(self: Arc<Self>); in wake()
13 fn wake_by_ref(arc_self: &Arc<Self>); in wake_by_ref()
32 pub(crate) fn waker_ref<W: Wake>(wake: &Arc<W>) -> WakerRef<'_> { in waker_ref()
54 let arc = ManuallyDrop::new(Arc::<T>::from_raw(data as *const T)); in inc_ref_count()
70 let arc: Arc<T> = Arc::from_raw(data as *const T); in wake_arc_raw()
77 let arc = ManuallyDrop::new(Arc::<T>::from_raw(data as *const T)); in wake_by_ref_arc_raw()
82 drop(Arc::<T>::from_raw(data as *const T)) in drop_arc_raw()
/external/rust/crates/futures-task/src/
Dwaker.rs4 use alloc::sync::Arc;
19 pub fn waker<W>(wake: Arc<W>) -> Waker in waker()
23 let ptr = Arc::into_raw(wake) as *const (); in waker()
36 let arc = mem::ManuallyDrop::new(Arc::<T>::from_raw(data as *const T)); in increase_refcount()
48 let arc: Arc<T> = Arc::from_raw(data as *const T); in wake_arc_raw()
55 let arc = mem::ManuallyDrop::new(Arc::<T>::from_raw(data as *const T)); in wake_by_ref_arc_raw()
60 drop(Arc::<T>::from_raw(data as *const T)) in drop_arc_raw()
/external/crosvm/cros_async/src/
During_executor.rs62 use std::sync::{Arc, Weak};
149 mem: Arc<dyn BackingMemory + Send + Sync>, in start_read_to_mem()
165 mem: Arc<dyn BackingMemory + Send + Sync>, in start_write_from_mem()
238 _file: Arc<File>,
239 _mem: Option<Arc<dyn BackingMemory + Send + Sync>>,
253 registered_sources: Slab<Arc<File>>,
302 fn spawn<F>(self: &Arc<Self>, f: F) -> Task<F::Output> in spawn()
307 let raw = Arc::downgrade(self); in spawn()
319 fn spawn_local<F>(self: &Arc<Self>, f: F) -> Task<F::Output> in spawn_local()
324 let raw = Arc::downgrade(self); in spawn_local()
[all …]
/external/rust/crates/tokio/tests/
Dsync_mutex_owned.rs9 use std::sync::Arc;
14 let l = Arc::new(Mutex::new(100)); in straight_execution()
37 let l = Arc::new(Mutex::new(100)); in readiness()
56 let m1: Arc<Mutex<usize>> = Arc::new(Mutex::new(0)); in aborted_future_1()
82 let m1: Arc<Mutex<usize>> = Arc::new(Mutex::new(0)); in aborted_future_2()
106 let m: Arc<Mutex<usize>> = Arc::new(Mutex::new(0)); in try_lock_owned()
120 let m = Arc::new(Mutex::new(s.to_string())); in debug_format()
/external/crosvm/devices/src/usb/xhci/
Dintr_resample_handler.rs8 use std::sync::Arc;
13 interrupter: Arc<Mutex<Interrupter>>,
21 interrupter: Arc<Mutex<Interrupter>>, in start()
23 ) -> Option<Arc<IntrResampleHandler>> { in start()
24 let handler = Arc::new(IntrResampleHandler { in start()
28 let tmp_handler: Arc<dyn EventHandler> = handler.clone(); in start()
32 Arc::downgrade(&tmp_handler), in start()
Dxhci.rs20 use std::sync::Arc;
68 fail_handle: Arc<dyn FailHandle>,
70 interrupter: Arc<Mutex<Interrupter>>,
71 command_ring_controller: Arc<CommandRingController>,
73 event_loop: Arc<EventLoop>,
79 intr_resample_handler: Arc<IntrResampleHandler>,
87 fail_handle: Arc<dyn FailHandle>, in new()
93 ) -> Result<Arc<Self>> { in new()
97 let interrupter = Arc::new(Mutex::new(Interrupter::new(mem.clone(), irq_evt, &regs))); in new()
98 let event_loop = Arc::new(event_loop); in new()
[all …]
Dtransfer_ring_controller.rs10 use std::sync::Arc;
27 port: Arc<UsbPort>,
28 interrupter: Arc<Mutex<Interrupter>>,
68 port: Arc<UsbPort>, in new()
69 event_loop: Arc<EventLoop>, in new()
70 interrupter: Arc<Mutex<Interrupter>>, in new()
73 ) -> Result<Arc<TransferRingController>, TransferRingControllerError> { in new()
Ddevice_slot.rs23 use std::sync::Arc;
87 fail_handle: Arc<dyn FailHandle>,
88 hub: Arc<UsbHub>,
89 slots: Vec<Arc<DeviceSlot>>,
94 fail_handle: Arc<dyn FailHandle>, in new()
96 hub: Arc<UsbHub>, in new()
97 interrupter: Arc<Mutex<Interrupter>>, in new()
98 event_loop: Arc<EventLoop>, in new()
103 slots.push(Arc::new(DeviceSlot::new( in new()
120 pub fn slot(&self, slot_id: u8) -> Option<Arc<DeviceSlot>> { in slot()
[all …]
Dring_buffer_stop_cb.rs7 use std::sync::{Arc, Mutex};
15 inner: Arc<Mutex<RingBufferStopCallbackInner>>,
22 inner: Arc::new(Mutex::new(RingBufferStopCallbackInner { in new()
42 fail_handle: Arc<dyn FailHandle>, in fallible_closure()
57 use std::sync::{Arc, Mutex};
63 let a = Arc::new(Mutex::new(0)); in simple_raii_callback()
/external/rust/crates/crossbeam-utils/tests/
Dsharded_lock.rs3 use std::sync::{Arc, TryLockError};
26 let r = Arc::new(ShardedLock::new(())); in frob()
52 let arc = Arc::new(ShardedLock::new(1)); in arc_poison_wr()
66 let arc = Arc::new(ShardedLock::new(1)); in arc_poison_ww()
82 let arc = Arc::new(ShardedLock::new(1)); in arc_no_poison_rr()
96 let arc = Arc::new(ShardedLock::new(1)); in arc_no_poison_sl()
109 let arc = Arc::new(ShardedLock::new(0)); in arc()
149 let arc = Arc::new(ShardedLock::new(1)); in arc_access_in_unwind()
153 i: Arc<ShardedLock<isize>>, in arc_access_in_unwind()
204 struct Foo(Arc<AtomicUsize>); in test_into_inner_drop()
[all …]
/external/crosvm/devices/src/utils/
Devent_loop.rs12 use std::sync::{Arc, Weak};
24 impl FailHandle for Option<Arc<dyn FailHandle>> {
43 fail_handle: Option<Arc<dyn FailHandle>>,
44 poll_ctx: Arc<EpollContext<Descriptor>>,
45 handlers: Arc<Mutex<BTreeMap<RawDescriptor, Weak<dyn EventHandler>>>>,
58 fail_handle: Option<Arc<dyn FailHandle>>, in start()
64 let fd_callbacks: Arc<Mutex<BTreeMap<RawDescriptor, Weak<dyn EventHandler>>>> = in start()
65 Arc::new(Mutex::new(BTreeMap::new())); in start()
76 let poll_ctx = Arc::new(poll_ctx); in start()
202 use std::sync::{Arc, Condvar, Mutex};
[all …]
/external/rust/crates/tokio/src/sync/tests/
Dloom_semaphore_batch.rs10 use std::sync::Arc;
23 async fn actor(shared: Arc<Shared>) { in basic_usage()
34 let shared = Arc::new(Shared { in basic_usage()
54 let semaphore = Arc::new(Semaphore::new(1)); in release()
75 let semaphore = Arc::new(Semaphore::new(1)); in basic_closing()
100 let semaphore = Arc::new(Semaphore::new(1)); in concurrent_close()
118 async fn poll_and_cancel(semaphore: Arc<Semaphore>) { in concurrent_cancel()
139 let semaphore = Arc::new(Semaphore::new(0)); in concurrent_cancel()
166 let semaphore = Arc::new(Semaphore::new(10)); in batch()
167 let active = Arc::new(AtomicUsize::new(0)); in batch()
[all …]
/external/adhd/sound_card_init/dsm/src/
Dzero_player.rs6 use std::sync::{Arc, Condvar, Mutex};
96 thread_run: Arc<AtomicBool>,
99 ready: Arc<(Mutex<bool>, Condvar)>,
113 let thread_run = Arc::new(AtomicBool::new(false)); in new()
114 let ready = Arc::new((Mutex::new(false), Condvar::new())); in new()
143 thread_run: Arc<AtomicBool>,
146 ready: Arc<(Mutex<bool>, Condvar)>,
157 thread_run: Arc<AtomicBool>, in new()
158 ready: Arc<(Mutex<bool>, Condvar)>, in new()
/external/crosvm/devices/src/virtio/
Dinterrupt.rs9 use std::sync::Arc;
33 interrupt_status: Arc<AtomicUsize>,
36 msix_config: Option<Arc<Mutex<MsixConfig>>>,
86 interrupt_status: Arc<AtomicUsize>, in new()
89 msix_config: Option<Arc<Mutex<MsixConfig>>>, in new()
108 pub fn get_msix_config(&self) -> &Option<Arc<Mutex<MsixConfig>>> { in get_msix_config()

12345678910>>...16