Home
last modified time | relevance | path

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

123

/system/bt/gd/rust/gddi/src/
Dlib.rs7 use std::sync::Arc;
15 type ProviderFnBox = Box<dyn Fn(Arc<Registry>) -> Pin<ProviderFutureBox> + Send + Sync>;
30 providers: Arc<Mutex<HashMap<TypeId, Provider>>>,
31 instances: Arc<Mutex<HashMap<TypeId, InstanceBox>>>,
32 start_order: Arc<Mutex<Vec<Box<dyn Stoppable + Send + Sync>>>>,
37 f: Arc<ProviderFnBox>,
62 self.providers.insert(TypeId::of::<T>(), Provider { f: Arc::new(f) }); in register_provider()
70 providers: Arc::new(Mutex::new(self.providers)), in build()
71 instances: Arc::new(Mutex::new(HashMap::new())), in build()
72 start_order: Arc::new(Mutex::new(Vec::new())), in build()
[all …]
/system/security/keystore2/src/
Dgc.rs30 Arc,
34 async_task: Arc<AsyncTask>,
35 notified: Arc<AtomicU8>,
45 pub fn new_init_with<F>(async_task: Arc<AsyncTask>, init: F) -> Self in new_init_with()
50 Arc<SuperKeyManager>, in new_init_with()
54 let weak_at = Arc::downgrade(&async_task); in new_init_with()
55 let notified = Arc::new(AtomicU8::new(0)); in new_init_with()
90 super_key: Arc<SuperKeyManager>,
91 notified: Arc<AtomicU8>,
Dwatchdog.rs23 sync::Arc,
36 wd: Arc<Watchdog>,
160 state: Arc<(Condvar, Mutex<WatchdogState>)>,
171 pub fn new(timeout: Duration) -> Arc<Self> { in new()
172 Arc::new(Self { in new()
173 state: Arc::new(( in new()
188 wd: &Arc<Self>, in watch_with_optional()
207 wd: &Arc<Self>, in watch_with()
216 pub fn watch(wd: &Arc<Self>, id: &'static str, timeout: Duration) -> Option<WatchPoint> { in watch()
308 let hit_count = Arc::new(atomic::AtomicU8::new(0)); in test_watchdog()
Dglobals.rs42 use std::sync::{Arc, Mutex, RwLock};
144 pub static ref SUPER_KEY: Arc<SuperKeyManager> = Default::default();
153 pub static ref ASYNC_TASK: Arc<AsyncTask> = Default::default();
158 pub static ref LEGACY_BLOB_LOADER: Arc<LegacyBlobLoader> = Arc::new(LegacyBlobLoader::new(
161 pub static ref LEGACY_MIGRATOR: Arc<LegacyMigrator> =
162 Arc::new(LegacyMigrator::new(Arc::new(Default::default())));
164 pub static ref LOGS_HANDLER: Arc<AsyncTask> = Default::default();
166 static ref GC: Arc<Gc> = Arc::new(Gc::new_init_with(ASYNC_TASK.clone(), || {
Dsuper_key.rs52 sync::Arc,
157 reencrypt_with: Option<Arc<SuperKey>>,
183 fn new(key: &[u8], to_encrypt: &Arc<SuperKey>) -> Result<Self> { in new()
196 reencrypt_with: Option<Arc<SuperKey>>, in decrypt()
197 ) -> Result<Arc<SuperKey>> { in decrypt()
222 Ok(Arc::new(SuperKey { algorithm: self.algorithm, key, id: self.id, reencrypt_with })) in decrypt()
246 per_boot: Option<Arc<SuperKey>>,
249 screen_lock_bound: Option<Arc<SuperKey>>,
252 screen_lock_bound_private: Option<Arc<SuperKey>>,
265 fn add_key_to_key_index(&mut self, super_key: &Arc<SuperKey>) -> Result<()> { in add_key_to_key_index()
[all …]
Dapc.rs21 sync::{mpsc::Sender, Arc, Mutex},
169 hal: Arc<ApcHal>,
196 state: Arc<Mutex<ApcState>>,
207 Self { state: Arc::new(Mutex::new(ApcState::new(confirmation_token_sender))) }, in new_native_binder()
213 state: Arc<Mutex<ApcState>>, in result()
302 Some(h) => Arc::new(h), in present_prompt()
/system/bt/gd/rust/topshim/src/
Dtopstack.rs5 use std::sync::Arc;
11 pub static ref RUNTIME: Arc<Runtime> = Arc::new(
21 pub fn get_runtime() -> Arc<Runtime> { in get_runtime()
/system/bt/gd/rust/hal/src/
Dlib.rs47 use std::sync::Arc;
54 pub evt_rx: Arc<Mutex<UnboundedReceiver<EventPacket>>>,
56 pub acl_rx: Arc<Mutex<UnboundedReceiver<AclPacket>>>,
58 pub iso_rx: Arc<Mutex<UnboundedReceiver<IsoPacket>>>,
81 evt_rx: Arc::new(Mutex::new(evt_rx)), in new()
83 acl_rx: Arc::new(Mutex::new(acl_up_rx)), in new()
85 iso_rx: Arc::new(Mutex::new(iso_up_rx)), in new()
Dsnoop.rs10 use std::sync::Arc;
33 pub rx: Arc<Mutex<Receiver<EventPacket>>>,
42 pub rx: Arc<Mutex<Receiver<AclPacket>>>,
51 pub rx: Arc<Mutex<Receiver<IsoPacket>>>,
133 async fn provide_snooped_hal(config: SnoopConfig, raw_hal: RawHal, rt: Arc<Runtime>) -> Hal { in provide_snooped_hal()
193 control: ControlHal { tx: cmd_down_tx, rx: Arc::new(Mutex::new(evt_up_rx)) }, in provide_snooped_hal()
194 acl: AclHal { tx: acl_down_tx, rx: Arc::new(Mutex::new(acl_up_rx)) }, in provide_snooped_hal()
195 iso: IsoHal { tx: iso_down_tx, rx: Arc::new(Mutex::new(iso_up_rx)) }, in provide_snooped_hal()
199 async fn consume<T>(rx: &Arc<Mutex<UnboundedReceiver<T>>>) -> Option<T> { in consume()
/system/bt/gd/rust/main/src/
Dlib.rs7 use std::sync::Arc;
20 registry: Arc<Registry>,
21 rt: Arc<Runtime>,
26 pub async fn new(rt: Arc<Runtime>) -> Self { in new()
27 let registry = Arc::new(RegistryBuilder::new().register_module(stack_module).build()); in new()
84 pub fn get_runtime(&self) -> Arc<Runtime> { in get_runtime()
/system/bt/gd/rust/facade/helpers/
Dlib.rs7 use std::sync::Arc;
21 rx: Arc<Mutex<Receiver<T>>>,
28 Self::from_arc(Arc::new(Mutex::new(rx))) in new()
32 pub fn from_arc(rx: Arc<Mutex<Receiver<T>>>) -> Self { in from_arc()
56 rt: &Arc<Runtime>, in stream_runnable()
/system/bt/gd/rust/linux/dbus_projection/src/
Dlib.rs11 use std::sync::{Arc, Mutex};
15 callbacks: Arc<Mutex<HashMap<BusName<'static>, Vec<Box<dyn Fn() + Send>>>>>,
21 DisconnectWatcher { callbacks: Arc::new(Mutex::new(HashMap::new())) } in new()
36 pub async fn setup_watch(&mut self, conn: Arc<SyncConnection>) { in setup_watch()
83 _conn: Arc<SyncConnection>,
85 _disconnect_watcher: Arc<Mutex<dbus_projection::DisconnectWatcher>>,
/system/bt/gd/rust/linux/service/src/
Dmain.rs21 use std::sync::{Arc, Mutex};
35 let intf = Arc::new(Mutex::new(BluetoothInterface::new())); in main()
36 let bluetooth = Arc::new(Mutex::new(Bluetooth::new(tx.clone(), intf.clone()))); in main()
37 let bluetooth_gatt = Arc::new(Mutex::new(BluetoothGatt::new(intf.clone()))); in main()
62 intf.lock().unwrap().initialize(Arc::new(btif_bluetooth_callbacks(tx)), vec![]); in main()
68 let disconnect_watcher = Arc::new(Mutex::new(DisconnectWatcher::new())); in main()
/system/extras/profcollectd/libprofcollectd/
Dtrace_provider.rs22 use std::sync::{Arc, Mutex};
33 pub fn get_trace_provider() -> Result<Arc<Mutex<dyn TraceProvider + Send>>> { in get_trace_provider()
36 return Ok(Arc::new(Mutex::new(SimpleperfEtmTraceProvider {}))); in get_trace_provider()
/system/bt/gd/rust/shim/src/
Dstack.rs8 use std::sync::Arc;
27 pub static ref RUNTIME: Arc<Runtime> = Arc::new(
73 Box::new(Controller(stack.get_blocking::<Arc<ControllerExports>>())) in get_controller()
Dcontroller.rs7 use std::sync::Arc;
10 pub struct Controller(pub Arc<ControllerExports>);
12 type Target = Arc<ControllerExports>;
Dhci.rs7 use std::sync::Arc;
26 rt: Arc<Runtime>,
30 pub fn new(rt: Arc<Runtime>, internal: HciFacadeService) -> Self { in new()
/system/bt/gd/rust/hci/src/
Dlib.rs29 use std::sync::Arc;
57 async fn provide_hci(control: ControlHal, rt: Arc<Runtime>) -> Hci { in provide_hci()
59 let evt_handlers = Arc::new(Mutex::new(HashMap::new())); in provide_hci()
60 let le_evt_handlers = Arc::new(Mutex::new(HashMap::new())); in provide_hci()
124 evt_handlers: Arc<Mutex<HashMap<EventCode, Sender<EventPacket>>>>,
125 le_evt_handlers: Arc<Mutex<HashMap<SubeventCode, Sender<LeMetaEventPacket>>>>,
169 evt_handlers: Arc<Mutex<HashMap<EventCode, Sender<EventPacket>>>>, in dispatch()
170 le_evt_handlers: Arc<Mutex<HashMap<SubeventCode, Sender<LeMetaEventPacket>>>>, in dispatch()
171 evt_rx: Arc<Mutex<Receiver<EventPacket>>>, in dispatch()
248 async fn consume(evt_rx: &Arc<Mutex<Receiver<EventPacket>>>) -> Option<EventPacket> { in consume()
Dcontroller_facade.rs12 use std::sync::Arc;
22 async fn provide_facade(exports: Arc<ControllerExports>, hci: Hci) -> ControllerFacadeService { in provide_facade()
30 pub exports: Arc<ControllerExports>,
/system/bt/gd/rust/link/src/acl/classic/
Dmod.rs19 use std::sync::Arc;
37 pub evt_rx: Arc<Mutex<Receiver<Event>>>,
60 shared: Arc<Mutex<ConnectionShared>>,
91 shared: Arc<Mutex<ConnectionShared>>,
138 rt: Arc<Runtime>, in provide_acl_manager()
145 …let connections: Arc<Mutex<HashMap<u16, ConnectionInternal>>> = Arc::new(Mutex::new(HashMap::new()… in provide_acl_manager()
194 let shared = Arc::new(Mutex::new(ConnectionShared { role })); in provide_acl_manager()
241 AclManager { req_tx, evt_rx: Arc::new(Mutex::new(conn_evt_rx)) } in provide_acl_manager()
257 connections: &Arc<Mutex<HashMap<u16, ConnectionInternal>>>, in dispatch_to()
270 connections: Arc<Mutex<HashMap<u16, ConnectionInternal>>>, in run_connection()
/system/bt/gd/rust/facade/src/
Dmain.rs18 use std::sync::{Arc, Mutex};
26 let rt = Arc::new(Runtime::new().unwrap()); in main()
27 rt.block_on(async_main(Arc::clone(&rt), sigint)); in main()
30 async fn async_main(rt: Arc<Runtime>, mut sigint: mpsc::UnboundedReceiver<()>) { in async_main()
56 let env = Arc::new(Environment::new(2)); in async_main()
Dlib.rs11 use std::sync::Arc;
19 rt: Arc<Runtime>,
26 rt: Arc<Runtime>, in create()
93 let env = Arc::new(Environment::new(2)); in start()
116 rt: Arc<Runtime>, in create()
/system/bt/gd/rust/linux/dbus_projection/dbus_macros/src/
Dlib.rs174 type ObjType = std::sync::Arc<std::sync::Mutex<dyn #api_iface_ident + Send>>; in generate_dbus_exporter()
178 conn: std::sync::Arc<SyncConnection>, in generate_dbus_exporter()
181 disconnect_watcher: Arc<Mutex<dbus_projection::DisconnectWatcher>>, in generate_dbus_exporter()
184 conn: Arc<SyncConnection>, in generate_dbus_exporter()
186 … disconnect_watcher: std::sync::Arc<std::sync::Mutex<dbus_projection::DisconnectWatcher>>, in generate_dbus_exporter()
353 conn: Arc<SyncConnection>, in dbus_propmap()
355 disconnect_watcher: Arc<Mutex<dbus_projection::DisconnectWatcher>>, in dbus_propmap()
476 conn: Arc<SyncConnection>, in dbus_proxy_obj()
479 disconnect_watcher: Arc<Mutex<DisconnectWatcher>>, in dbus_proxy_obj()
497 conn: Arc<SyncConnection>, in dbus_proxy_obj()
[all …]
/system/bt/gd/rust/linux/stack/src/
Dbluetooth_gatt.rs5 use std::sync::{Arc, Mutex};
60 _intf: Arc<Mutex<BluetoothInterface>>,
65 pub fn new(intf: Arc<Mutex<BluetoothInterface>>) -> BluetoothGatt { in new()
/system/security/keystore2/src/database/
Dperboot.rs25 use std::sync::Arc;
81 pub static ref PERBOOT_DB: Arc<PerbootDB> = Arc::new(PerbootDB::new());

123