Home
last modified time | relevance | path

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

1234

/packages/modules/Bluetooth/system/gd/rust/linux/client/src/
Dcallbacks.rs48 use std::sync::{Arc, Mutex};
61 context: Arc<Mutex<ClientContext>>,
63 dbus_connection: Arc<SyncConnection>,
64 dbus_crossroads: Arc<Mutex<Crossroads>>,
70 context: Arc<Mutex<ClientContext>>, in new()
71 dbus_connection: Arc<SyncConnection>, in new()
72 dbus_crossroads: Arc<Mutex<Crossroads>>, in new()
108 Arc::new(Mutex::new(DisconnectWatcher::new())), in export_for_rpc()
110 cr.lock().unwrap().insert(self.get_object_id(), &[iface], Arc::new(Mutex::new(self))); in export_for_rpc()
117 context: Arc<Mutex<ClientContext>>,
[all …]
Deditor.rs15 use std::sync::{Arc, Mutex};
39 client_context: Arc<Mutex<ClientContext>>,
143 rl: Arc<Mutex<Editor<BtHelper>>>,
144 result: Arc<Mutex<Option<rustyline::Result<String>>>>,
171 rl: Arc<Mutex<Editor<BtHelper>>>,
180 client_context: Arc<Mutex<ClientContext>>, in new()
190 Ok(AsyncEditor { rl: Arc::new(Mutex::new(rl)) }) in new()
198 AsyncReadline { rl: self.rl.clone(), result: Arc::new(Mutex::new(None)) } in readline()
/packages/modules/Bluetooth/system/gd/rust/topshim/facade/src/
Dmedia_service.rs15 use std::sync::{Arc, Mutex};
34 rt: Arc<Runtime>,
35 pub btif_a2dp: Arc<Mutex<A2dp>>,
36 btif_a2dp_sink: Arc<Mutex<A2dpSink>>,
37 pub btif_avrcp: Arc<Mutex<Avrcp>>,
42 pub fn create(rt: Arc<Runtime>, btif_intf: Arc<Mutex<BluetoothInterface>>) -> grpcio::Service { in create()
51 btif_a2dp: Arc::new(Mutex::new(btif_a2dp)), in create()
52 btif_a2dp_sink: Arc::new(Mutex::new(btif_a2dp_sink)), in create()
53 btif_avrcp: Arc::new(Mutex::new(btif_avrcp)), in create()
Dhfp_service.rs15 use std::sync::{Arc, Mutex};
20 _hfp: Arc<Mutex<Hfp>>, in get_hfp_dispatcher()
21 tx: Arc<Mutex<Option<mpsc::Sender<HfpCallbacks>>>>, in get_hfp_dispatcher()
47 rt: Arc<Runtime>,
48 pub btif_hfp: Arc<Mutex<Hfp>>,
50 event_tx: Arc<Mutex<Option<mpsc::Sender<HfpCallbacks>>>>,
55 pub fn create(rt: Arc<Runtime>, btif_intf: Arc<Mutex<BluetoothInterface>>) -> grpcio::Service { in create()
56 let btif_hfp = Arc::new(Mutex::new(Hfp::new(&btif_intf.lock().unwrap()))); in create()
57 let event_tx = Arc::new(Mutex::new(None)); in create()
Dsecurity_service.rs12 use std::sync::{Arc, Mutex};
19 rt: Arc<Runtime>,
21 btif_intf: Arc<Mutex<BluetoothInterface>>,
27 pub fn create(rt: Arc<Runtime>, btif_intf: Arc<Mutex<BluetoothInterface>>) -> grpcio::Service { in create()
Dhf_client_service.rs14 use std::sync::{Arc, Mutex};
25 rt: Arc<Runtime>,
26 pub hf_client: Arc<Mutex<HfClient>>,
31 pub fn create(rt: Arc<Runtime>, btif_intf: Arc<Mutex<BluetoothInterface>>) -> grpcio::Service { in create()
32 let hf_client = Arc::new(Mutex::new(HfClient::new(&btif_intf.lock().unwrap()))); in create()
Dmain.rs13 use std::sync::{Arc, Mutex};
42 let rt = Arc::new(Runtime::new().unwrap()); in main()
43 rt.block_on(async_main(Arc::clone(&rt), sigint)); in main()
79 async fn async_main(rt: Arc<Runtime>, mut sigint: mpsc::UnboundedReceiver<()>) { in async_main()
84 let env = Arc::new(Environment::new(2)); in async_main()
86 let btif_intf = Arc::new(Mutex::new(btif::get_btinterface().unwrap())); in async_main()
Dadapter_service.rs19 use std::sync::{Arc, Mutex};
25 btif: Arc<Mutex<BluetoothInterface>>, in get_bt_dispatcher()
75 rt: Arc<Runtime>,
76 btif_intf: Arc<Mutex<BluetoothInterface>>,
77 event_rx: Arc<TokioMutex<mpsc::Receiver<BaseCallbacks>>>,
93 pub fn create(rt: Arc<Runtime>, btif_intf: Arc<Mutex<BluetoothInterface>>) -> grpcio::Service { in create()
102 event_rx: Arc::new(TokioMutex::new(rx)), in create()
/packages/modules/Bluetooth/system/gd/rust/linux/service/src/
Dinterface_manager.rs5 use std::sync::{Arc, Mutex};
56 conn: Arc<SyncConnection>, in dispatch()
58 disconnect_watcher: Arc<Mutex<DisconnectWatcher>>, in dispatch()
59 bluetooth: Arc<Mutex<Box<Bluetooth>>>, in dispatch()
60 bluetooth_admin: Arc<Mutex<Box<BluetoothAdmin>>>, in dispatch()
61 bluetooth_gatt: Arc<Mutex<Box<BluetoothGatt>>>, in dispatch()
62 battery_service: Arc<Mutex<Box<BatteryService>>>, in dispatch()
63 battery_manager: Arc<Mutex<Box<BatteryManager>>>, in dispatch()
64 battery_provider_manager: Arc<Mutex<Box<BatteryProviderManager>>>, in dispatch()
65 bluetooth_media: Arc<Mutex<Box<BluetoothMedia>>>, in dispatch()
[all …]
Dmain.rs8 use std::sync::{Arc, Condvar, Mutex};
108 let logging = Arc::new(Mutex::new(Box::new(BluetoothLogging::new( in main()
127 let sig_notifier = Arc::new(SigData { in main()
134 let intf = Arc::new(Mutex::new(get_btinterface().unwrap())); in main()
136 Arc::new(Mutex::new(Box::new(BluetoothGatt::new(intf.clone(), tx.clone())))); in main()
138 Arc::new(Mutex::new(Box::new(BatteryProviderManager::new(tx.clone())))); in main()
139 let battery_service = Arc::new(Mutex::new(Box::new(BatteryService::new( in main()
145 let battery_manager = Arc::new(Mutex::new(Box::new(BatteryManager::new( in main()
149 let bluetooth_media = Arc::new(Mutex::new(Box::new(BluetoothMedia::new( in main()
154 let bluetooth_admin = Arc::new(Mutex::new(Box::new(BluetoothAdmin::new( in main()
[all …]
/packages/modules/DnsResolver/doh/
Dconfig.rs30 use std::sync::{Arc, RwLock, Weak};
37 pub struct Config(Arc<Mutex<quiche::Config>>);
51 Arc::downgrade(&self.0) in to_weak()
80 Ok(Self(Arc::new(Mutex::new(config)))) in from_key()
124 state: Arc<RwLock<State>>,
202 assert_eq!(Arc::strong_count(&config_a.0), 2); in shared_cache()
206 assert_eq!(Arc::strong_count(&config_a.0), 3); in shared_cache()
227 assert_eq!(Arc::strong_count(&config_a.0), 1); in different_keys()
228 assert_eq!(Arc::strong_count(&config_b.0), 2); in different_keys()
229 assert_eq!(Arc::strong_count(&config_c.0), 2); in different_keys()
[all …]
/packages/modules/Bluetooth/system/gd/rust/topshim/src/
Dtopstack.rs8 use std::sync::{Arc, Mutex};
14 pub static ref RUNTIME: Arc<Runtime> = Arc::new(
24 pub fn get_runtime() -> Arc<Runtime> { in get_runtime()
29 static ref CB_DISPATCHER: Arc<Mutex<DispatchContainer>> =
30 Arc::new(Mutex::new(DispatchContainer { instances: HashMap::new() }));
106 pub fn get_dispatchers() -> Arc<Mutex<DispatchContainer>> { in get_dispatchers()
/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/src/
Dpowerd_suspend_manager.rs9 use std::sync::{Arc, Mutex};
45 powerd_proxy: dbus::nonblock::Proxy<'static, Arc<SyncConnection>>,
52 dbus_connection: Arc<SyncConnection>,
53 dbus_crossroads: Arc<Mutex<Crossroads>>,
55 context: Arc<Mutex<SuspendManagerContext>>,
61 dbus_connection: Arc<SyncConnection>, in new()
62 dbus_crossroads: Arc<Mutex<Crossroads>>, in new()
63 context: Arc<Mutex<SuspendManagerContext>>, in new()
83 powerd_proxy: dbus::nonblock::Proxy<'static, Arc<SyncConnection>>, in send_handle_suspend_readiness()
177 Arc::new(Mutex::new(DisconnectWatcher::new())), in export_for_rpc()
[all …]
Diface_bluetooth_manager.rs3 use std::sync::{Arc, Mutex};
16 pub manager: Arc<Mutex<Box<BluetoothManager>>>,
17 pub experimental: Arc<Mutex<Box<BluetoothManager>>>,
/packages/modules/Connectivity/remoteauth/service/jni/src/
Dremoteauth_jni_android_platform.rs29 Arc, Mutex,
55 static ref HANDLE_MAPPING: Mutex<HashMap<i64, Arc<Mutex<JavaPlatform>>>> =
64 fn insert_platform_handle(handle: i64, item: Arc<Mutex<JavaPlatform>>) { in insert_platform_handle()
74 HANDLE_MAPPING.lock().unwrap().insert(handle, Arc::clone(&item)); in insert_platform_handle()
100 vm: &'static Arc<JavaVM>,
111 ) -> Result<Arc<Mutex<impl Platform>>, JNIError> { in create()
113 let platform = Arc::new(Mutex::new(JavaPlatform::new( in create()
118 insert_platform_handle(platform_handle, Arc::clone(&platform)); in create()
119 Ok(Arc::clone(&platform)) in create()
124 vm: &'static Arc<JavaVM>, in new()
Dunique_jvm.rs23 use std::sync::{Arc, Once};
28 static mut JVM: Option<Arc<JavaVM>> = None;
38 JVM = Some(Arc::new(jvm)); in set_once()
44 pub(crate) fn get_static_ref() -> Option<&'static Arc<JavaVM>> { in get_static_ref()
/packages/modules/Bluetooth/system/gd/rust/linux/dbus_projection/src/
Dlib.rs55 use std::sync::{Arc, Mutex};
73 callbacks: Arc<Mutex<HashMap<BusName<'static>, HashMap<u32, Box<dyn Fn(u32) + Send>>>>>,
79 DisconnectWatcher { next_id: 0, callbacks: Arc::new(Mutex::new(HashMap::new())) } in new()
103 pub async fn setup_watch(&mut self, conn: Arc<SyncConnection>) { in setup_watch()
166 conn: Arc<SyncConnection>,
174 conn: Arc<SyncConnection>, in new()
182 fn create_proxy(&self) -> dbus::nonblock::Proxy<Arc<SyncConnection>> { in create_proxy()
261 _conn: Option<Arc<SyncConnection>>,
264 Arc<std::sync::Mutex<dbus_projection::DisconnectWatcher>>,
296 _conn: Option<Arc<SyncConnection>>,
[all …]
/packages/modules/Uwb/service/uci/jni/src/
Dunique_jvm.rs21 use std::sync::{Arc, Once};
26 static mut JVM: Option<Arc<JavaVM>> = None;
36 JVM = Some(Arc::new(jvm)); in set_once()
42 pub(crate) fn get_static_ref() -> Option<&'static Arc<JavaVM>> { in get_static_ref()
/packages/modules/Bluetooth/system/gd/rust/linux/stack/src/
Dsuspend.rs11 use std::sync::{Arc, Mutex};
130 bt: Arc<Mutex<Box<Bluetooth>>>,
131 intf: Arc<Mutex<BluetoothInterface>>,
132 gatt: Arc<Mutex<Box<BluetoothGatt>>>,
133 media: Arc<Mutex<Box<BluetoothMedia>>>,
145 suspend_state: Arc<Mutex<SuspendState>>,
150 bt: Arc<Mutex<Box<Bluetooth>>>, in new()
151 intf: Arc<Mutex<BluetoothInterface>>, in new()
152 gatt: Arc<Mutex<Box<BluetoothGatt>>>, in new()
153 media: Arc<Mutex<Box<BluetoothMedia>>>, in new()
[all …]
Dasync_helper.rs2 use std::sync::{Arc, Mutex};
18 senders: Arc<Mutex<HashMap<u32, oneshot::Sender<R>>>>,
21 pub(crate) type CallbackSender<R> = Arc<Mutex<Box<(dyn Fn(u32, R) + Send)>>>;
28 senders: Arc::new(Mutex::new(HashMap::new())), in new()
77 return Arc::new(Mutex::new(Box::new(move |call_id, ret| { in get_callback_sender()
Dlib.rs26 use std::sync::{Arc, Mutex};
214 bluetooth: Arc<Mutex<Box<Bluetooth>>>, in dispatch()
215 bluetooth_gatt: Arc<Mutex<Box<BluetoothGatt>>>, in dispatch()
216 battery_service: Arc<Mutex<Box<BatteryService>>>, in dispatch()
217 battery_manager: Arc<Mutex<Box<BatteryManager>>>, in dispatch()
218 battery_provider_manager: Arc<Mutex<Box<BatteryProviderManager>>>, in dispatch()
219 bluetooth_media: Arc<Mutex<Box<BluetoothMedia>>>, in dispatch()
220 suspend: Arc<Mutex<Box<Suspend>>>, in dispatch()
221 bluetooth_socketmgr: Arc<Mutex<Box<BluetoothSocketManager>>>, in dispatch()
222 bluetooth_admin: Arc<Mutex<Box<BluetoothAdmin>>>, in dispatch()
[all …]
/packages/modules/Bluetooth/system/rust/src/core/
Dshared_mutex.rs4 use std::{future::Future, rc::Rc, sync::Arc};
15 lock: Arc<Mutex<T>>,
22 Self { lock: Arc::new(Mutex::new(t)), on_death: Rc::new(Semaphore::new(0)) } in new()
63 self.on_death.add_permits(Arc::strong_count(&self.lock) + 1); in drop()
/packages/modules/Bluetooth/system/gd/rust/linux/dbus_projection/dbus_macros/src/
Dlib.rs122 None => quote! { std::sync::Arc<std::sync::Mutex<Box<T>>> }, in generate_dbus_exporter()
286 conn: std::sync::Arc<dbus::nonblock::SyncConnection>, in generate_dbus_exporter()
288 … disconnect_watcher: std::sync::Arc<std::sync::Mutex<dbus_projection::DisconnectWatcher>>, in generate_dbus_exporter()
706 conn__: Option<std::sync::Arc<dbus::nonblock::SyncConnection>>, in dbus_propmap()
708 …disconnect_watcher__: Option<std::sync::Arc<std::sync::Mutex<dbus_projection::DisconnectWatcher>>>, in dbus_propmap()
923 conn: std::sync::Arc<dbus::nonblock::SyncConnection>, in dbus_proxy_obj()
926 disconnect_watcher: std::sync::Arc<std::sync::Mutex<DisconnectWatcher>>, in dbus_proxy_obj()
930 …cb_futures: std::sync::Arc<std::sync::Mutex<std::collections::VecDeque<dbus::nonblock::MethodReply… in dbus_proxy_obj()
934 futures_awaiting: std::sync::Arc<std::sync::Mutex<bool>>, in dbus_proxy_obj()
939 conn: std::sync::Arc<dbus::nonblock::SyncConnection>, in dbus_proxy_obj()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/
Dfuture.rs15 use std::sync::Arc;
27 fn wake(self: Arc<Self>) {} in noop_waker()
30 Arc::new(NoopWaker).into() in noop_waker()
/packages/modules/DnsResolver/doh/network/
Ddriver.rs27 use std::sync::Arc;
63 Failed(Arc<anyhow::Error>),
111 self.status_tx.send(Status::Failed(Arc::new(e)))? in drive()
154 Err(e) => self.status_tx.send(Status::Failed(Arc::new(anyhow!(e)))), in force_probe()
160 self.status_tx.send(Status::Failed(Arc::new(anyhow!("Empty response")))) in force_probe()
167 Err(time) => self.status_tx.send(Status::Failed(Arc::new(anyhow!( in force_probe()

1234