Home
last modified time | relevance | path

Searched refs:tx (Results 1 – 25 of 40) sorted by relevance

12

/system/security/keystore2/src/database/
Dversioning.rs18 pub fn create_or_get_version(tx: &Transaction, current_version: u32) -> Result<u32> { in create_or_get_version()
19 tx.execute( in create_or_get_version()
27 let version = tx in create_or_get_version()
43 let version = if tx in create_or_get_version()
59 tx.execute("INSERT INTO persistent.version (id, version) VALUES(0, ?);", params![version]) in create_or_get_version()
66 pub fn update_version(tx: &Transaction, new_version: u32) -> Result<()> { in update_version()
67 let updated = tx in update_version()
77 pub fn upgrade_database<F>(tx: &Transaction, current_version: u32, upgraders: &[F]) -> Result<()> in upgrade_database()
84 let mut db_version = create_or_get_version(tx, current_version) in upgrade_database()
87 db_version = upgraders[db_version as usize](tx).with_context(|| { in upgrade_database()
[all …]
/system/core/trusty/storage/lib/
Dstorage.c148 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)name, strlen(name)}}; in storage_open_file() local
152 ssize_t rc = send_reqv(session, tx, 3, rx, 2); in storage_open_file()
170 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in storage_close_file() local
173 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 1); in storage_close_file()
184 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)name, strlen(name)}}; in storage_delete_file() local
187 ssize_t rc = send_reqv(session, tx, 3, rx, 1); in storage_delete_file()
195 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in _read_chunk() local
198 ssize_t rc = send_reqv(_to_session(fh), tx, 2, rx, 2); in _read_chunk()
230 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)buf, size}}; in _write_req() local
233 ssize_t rc = send_reqv(_to_session(fh), tx, 3, rx, 1); in _write_req()
[all …]
/system/bt/gd/rust/linux/stack/src/
Dbluetooth.rs55 tx: Sender<Message>, field
61 pub fn new(tx: Sender<Message>, intf: Arc<Mutex<BluetoothInterface>>) -> Bluetooth { in new()
63 tx, in new()
162 let tx = self.tx.clone(); in register_callback() localVariable
169 let tx = tx.clone(); in register_callback() localVariable
171 let _result = tx.send(Message::BluetoothCallbackDisconnected(id)).await; in register_callback()
/system/security/keystore2/src/
Ddatabase.rs129 fn load_from_db(key_id: i64, tx: &Transaction) -> Result<Self> { in load_from_db()
130 let mut stmt = tx in load_from_db()
155 fn store_in_db(&self, key_id: i64, tx: &Transaction) -> Result<()> { in store_in_db()
156 let mut stmt = tx in store_in_db()
204 fn load_from_db(blob_id: i64, tx: &Transaction) -> Result<Self> { in load_from_db()
205 let mut stmt = tx in load_from_db()
230 fn store_in_db(&self, blob_id: i64, tx: &Transaction) -> Result<()> { in store_in_db()
231 let mut stmt = tx in store_in_db()
849 db.with_transaction(TransactionBehavior::Immediate, |tx| { in new()
850 versioning::upgrade_database(tx, Self::CURRENT_DB_VERSION, Self::UPGRADERS) in new()
[all …]
/system/bt/gd/rust/shim/src/
Dmessage_loop_thread.rs36 tx: UnboundedSender<cxx::UniquePtr<ffi::OnceClosure>>, field
43 let (tx, mut rx) = unbounded_channel::<cxx::UniquePtr<ffi::OnceClosure>>(); in main_message_loop_thread_create()
50 Box::new(MessageLoopThread { rt, tx }) in main_message_loop_thread_create()
66 if thread.tx.send(closure).is_err() { in main_message_loop_thread_do_delayed()
Dhci.rs56 let tx = hci.internal.acl_tx.clone(); in hci_send_acl() localVariable
58 tx.send(packet).await.unwrap(); in hci_send_acl()
/system/libfmq/tests/
Dfmq_unit_tests.cpp681 typename TypeParam::MQType::MemTransaction tx; in TYPED_TEST() local
682 ASSERT_TRUE(this->mQueue->beginWrite(dataLen, &tx)); in TYPED_TEST()
684 ASSERT_TRUE(tx.copyTo(data, 0 /* startIdx */, dataLen)); in TYPED_TEST()
690 ASSERT_TRUE(this->mQueue->beginRead(dataLen, &tx)); in TYPED_TEST()
692 ASSERT_TRUE(tx.copyFrom(readData, 0 /* startIdx */, dataLen)); in TYPED_TEST()
709 typename TypeParam::MQType::MemTransaction tx; in TYPED_TEST() local
710 ASSERT_TRUE(this->mQueue->beginWrite(dataLen, &tx)); in TYPED_TEST()
712 auto first = tx.getFirstRegion(); in TYPED_TEST()
713 auto second = tx.getSecondRegion(); in TYPED_TEST()
717 uint8_t* ptr = tx.getSlot(i); in TYPED_TEST()
[all …]
Dmsgq_test_client.cpp662 typename TypeParam::MQType::MemTransaction tx; in TYPED_TEST() local
663 ASSERT_TRUE(this->mQueue->beginRead(dataLen, &tx)); in TYPED_TEST()
665 const auto& region = tx.getFirstRegion(); in TYPED_TEST()
697 typename TypeParam::MQType::MemTransaction tx; in TYPED_TEST() local
698 ASSERT_TRUE(this->mQueue->beginRead(dataLen, &tx)); in TYPED_TEST()
700 auto first = tx.getFirstRegion(); in TYPED_TEST()
701 auto second = tx.getSecondRegion(); in TYPED_TEST()
743 typename TypeParam::MQType::MemTransaction tx; in TYPED_TEST() local
744 ASSERT_TRUE(this->mQueue->beginWrite(dataLen, &tx)); in TYPED_TEST()
746 auto first = tx.getFirstRegion(); in TYPED_TEST()
[all …]
/system/bt/stack/rfcomm/
Dport_utils.cc124 memset(&p_port->tx, 0, sizeof(p_port->tx)); in port_set_defaults()
126 p_port->tx.queue = fixed_queue_new(SIZE_MAX); in port_set_defaults()
217 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->tx.queue)) != in port_release_port()
221 p_port->tx.queue_size = 0; in port_release_port()
239 fixed_queue_free(p_port->tx.queue, nullptr); in port_release_port()
240 p_port->tx.queue = nullptr; in port_release_port()
390 bool fc = p_port->tx.peer_fc || !p_port->rfc.p_mcb || in port_flow_control_user()
392 (p_port->tx.queue_size > PORT_TX_HIGH_WM) || in port_flow_control_user()
393 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_HIGH_WM); in port_flow_control_user()
395 if (p_port->tx.user_fc == fc) return (0); in port_flow_control_user()
[all …]
Dport_api.cc800 if (p_port->tx.peer_fc || !p_port->rfc.p_mcb || in port_write()
805 if ((p_port->tx.queue_size > PORT_TX_CRITICAL_WM) || in port_write()
806 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_CRITICAL_WM)) { in port_write()
807 RFCOMM_TRACE_WARNING("PORT_Write: Queue size: %d", p_port->tx.queue_size); in port_write()
820 p_port->tx.peer_fc, in port_write()
824 fixed_queue_enqueue(p_port->tx.queue, p_buf); in port_write()
825 p_port->tx.queue_size += p_buf->len; in port_write()
895 p_buf = (BT_HDR*)fixed_queue_try_peek_last(p_port->tx.queue); in PORT_WriteDataCO()
915 p_port->tx.queue_size += (uint16_t)available; in PORT_WriteDataCO()
933 if ((p_port->tx.queue_size > PORT_TX_HIGH_WM) || in PORT_WriteDataCO()
[all …]
/system/bt/gd/rust/linux/adapter/src/
Dmain.rs25 tx: Sender<Callbacks>, field
32 let (tx, rx) = mpsc::channel::<Callbacks>(1); in make_context()
34 let (tx1, tx2, tx3, tx4, tx5) = (tx.clone(), tx.clone(), tx.clone(), tx.clone(), tx.clone()); in make_context()
80 return Context { tx, rx, callbacks: cb, intf }; in make_context()
/system/bt/gd/rust/facade/src/
Dlib.rs121 let (tx, mut rx) = channel::<LifecycleCommand>(1); in create()
145 Self { lifecycle_tx: tx } in create()
149 let (tx, rx) = oneshot::channel(); in start()
150 self.lifecycle_tx.send(LifecycleCommand::Start { req, done: tx }).await?; in start()
156 let (tx, rx) = oneshot::channel(); in stop()
157 self.lifecycle_tx.send(LifecycleCommand::Stop { done: tx }).await?; in stop()
Dmain.rs82 let (tx, rx) = mpsc::unbounded(); in install_sigint()
83 *SIGINT_TX.lock().unwrap() = Some(tx); in install_sigint()
103 if let Some(tx) = &*sigint_tx { in handle_sigint()
105 tx.unbounded_send(()).unwrap(); in handle_sigint()
/system/security/keystore2/legacykeystore/
Dlib.rs63 .and_then(|tx| f(&tx).map(|result| (result, tx))) in with_transaction()
64 .and_then(|(result, tx)| { in with_transaction()
65 tx.commit().context("In with_transaction: Failed to commit transaction.")?; in with_transaction()
90 self.with_transaction(TransactionBehavior::Immediate, |tx| { in init_tables()
91 tx.execute( in init_tables()
105 self.with_transaction(TransactionBehavior::Deferred, |tx| { in list()
106 let mut stmt = tx in list()
119 self.with_transaction(TransactionBehavior::Immediate, |tx| { in put()
120 tx.execute( in put()
130 self.with_transaction(TransactionBehavior::Deferred, |tx| { in get()
[all …]
/system/libfmq/fuzzer/
Dfmq_fuzzer.cpp79 typename Queue::MemTransaction tx; in reader() local
81 if (!readMq.beginRead(numElements, &tx)) { in reader()
84 const auto& region = tx.getFirstRegion(); in reader()
101 typename Queue::MemTransaction tx; in writer() local
103 if (!writeMq.beginWrite(numElements, &tx)) { in writer()
109 const auto& region = tx.getFirstRegion(); in writer()
/system/bt/gd/rust/link/src/acl/
Dcore.rs32 pub tx: Option<Sender<Bytes>>, field
56 let (tx, rx) = oneshot::channel(); in register()
57 self.requests.send(Request::Register { handle, bt, fut: tx }).await.unwrap(); in register()
122 tx: Some(in_tx), in provide_acl_dispatch()
139 acl.tx.send(p).await.unwrap(); in provide_acl_dispatch()
143 acl.tx.send(p).await.unwrap(); in provide_acl_dispatch()
/system/bt/gd/rust/linux/stack/btif_macros/src/
Dlib.rs96 let tx_clone = tx.clone(); in btif_callbacks_generator()
98 let tx = tx_clone.clone(); in btif_callbacks_generator() localVariable
100 let result = tx.send(Message::#stack_message(#arg_names)).await; in btif_callbacks_generator()
116 pub fn #fn_ident(tx: tokio::sync::mpsc::Sender<Message>) -> #callbacks_struct_ident { in btif_callbacks_generator()
/system/bt/gd/rust/linux/service/src/
Dmain.rs33 let (tx, rx) = Stack::create_channel(); in main()
36 let bluetooth = Arc::new(Mutex::new(Bluetooth::new(tx.clone(), intf.clone()))); in main()
62 intf.lock().unwrap().initialize(Arc::new(btif_bluetooth_callbacks(tx)), vec![]); in main()
/system/bt/gd/rust/linux/mgmt/src/bin/btmanagerd/
Dstate_machine.rs27 tx: mpsc::Sender<StateMachineActions>, field
37 let (tx, rx) = mpsc::channel::<StateMachineActions>(1); in new()
38 StateMachineContext { tx: tx, rx: rx, state_machine: state_machine } in new()
43 tx: self.tx.clone(), in get_proxy()
56 tx: mpsc::Sender<StateMachineActions>, field
66 self.tx.send(StateMachineActions::StartBluetooth(hci_interface)).await in start_bluetooth()
70 self.tx.send(StateMachineActions::StopBluetooth(hci_interface)).await in stop_bluetooth()
174 … context.tx.send(StateMachineActions::BluetoothStarted(pid, hci)).await; in mainloop()
182 … context.tx.send(StateMachineActions::BluetoothStopped()).await; in mainloop()
/system/bt/gd/rust/link/src/acl/classic/
Dmod.rs59 tx: Sender<Bytes>, field
77 let (tx, rx) = oneshot::channel(); in disconnect()
78 self.requests.send(ConnectionRequest::Disconnect { reason, fut: tx }).await.unwrap(); in disconnect()
108 let (tx, rx) = oneshot::channel(); in cancel_connect()
109 self.req_tx.send(Request::CancelConnect { addr, fut: tx }).await.unwrap(); in cancel_connect()
201 tx: core_conn.tx.take().unwrap(), in provide_acl_manager()
/system/bt/gd/rust/hal/src/
Dfacade.rs51 let cmd_tx = self.control.tx.clone(); in send_command()
59 let acl_tx = self.acl.tx.clone(); in send_acl()
71 let iso_tx = self.iso.tx.clone(); in send_iso()
Dsnoop.rs31 pub tx: Sender<CommandPacket>, field
40 pub tx: Sender<AclPacket>, field
49 pub tx: Sender<IsoPacket>, field
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()
/system/bt/gd/common/
Dbidi_queue.h33 …BidiQueueEnd(::bluetooth::os::IQueueEnqueue<TENQUEUE>* tx, ::bluetooth::os::IQueueDequeue<TDEQUEUE… in BidiQueueEnd() argument
34 : tx_(tx), rx_(rx) {} in BidiQueueEnd()
/system/tools/aidl/tests/
Daidl_test_client_loggable_interface.cpp56 BpLoggableInterface::logFunc = [&](const BpLoggableInterface::TransactionLog& tx) { log = tx; }; in TEST_F() argument
Daidl_test_client_ndk_loggable_interface.cpp62 BpLoggableInterface::logFunc = [&](const BpLoggableInterface::TransactionLog& tx) { log = tx; }; in TEST_F() argument

12