Lines Matching full:transaction
33 transaction::Transaction,
246 /// Work item used to deliver error codes to the thread that started a transaction. Stored here
259 current_transaction: Option<DArc<Transaction>>,
337 /// Fetches the transaction this thread can reply to. If the thread has a pending transaction
338 /// (that it could respond to) but it has also issued a transaction, it must first wait for the
339 /// previously-issued transaction to complete.
342 fn pop_transaction_to_reply(&mut self, thread: &Thread) -> Result<DArc<Transaction>> { in pop_transaction_to_reply() argument
343 let transaction = self.current_transaction.take().ok_or(EINVAL)?; in pop_transaction_to_reply() localVariable
344 if core::ptr::eq(thread, transaction.from.as_ref()) { in pop_transaction_to_reply()
345 self.current_transaction = Some(transaction); in pop_transaction_to_reply()
348 // Find a new current transaction for this thread. in pop_transaction_to_reply()
349 self.current_transaction = transaction.find_from(thread).cloned(); in pop_transaction_to_reply()
350 Ok(transaction) in pop_transaction_to_reply()
353 fn pop_transaction_replied(&mut self, transaction: &DArc<Transaction>) -> bool { in pop_transaction_replied()
357 if !Arc::ptr_eq(transaction, &old) { in pop_transaction_replied()
392 /// transaction stack. But if there is local work, we want to return to userspace before we
473 t.debug_print_inner(m, " outgoing transaction "); in debug_print()
476 t.debug_print_inner(m, " incoming transaction "); in debug_print()
479 t.debug_print_inner(m, " bad transaction "); in debug_print()
485 work.debug_print(m, " ", " pending transaction ")?; in debug_print()
497 pub(crate) fn set_current_transaction(&self, transaction: DArc<Transaction>) { in set_current_transaction() argument
498 self.inner.lock().current_transaction = Some(transaction); in set_current_transaction()
544 /// This must only be called when the thread is not participating in a transaction chain. If it
562 // a transaction and it is not in the process' ready list. in get_work()
692 // This will be overwritten with the actual fd when the transaction is received. in translate_object()
921 /// This method copies the payload of a transaction into the target process.
925 /// and those objects have to be translated so that they make sense to the target transaction.
1023 pr_warn!("Got transaction with invalid offset."); in copy_transaction_data()
1086 while let Ok(transaction) = { in unwind_transaction_stack()
1091 if !transaction.from.deliver_single_reply(reply, &transaction) { in unwind_transaction_stack()
1095 thread = transaction.from.clone(); in unwind_transaction_stack()
1101 reply: Result<DLArc<Transaction>, u32>, in deliver_reply() argument
1102 transaction: &DArc<Transaction>, in deliver_reply() argument
1104 if self.deliver_single_reply(reply, transaction) { in deliver_reply()
1105 transaction.from.unwind_transaction_stack(); in deliver_reply()
1109 /// Delivers a reply to the thread that started a transaction. The reply can either be a
1110 /// reply-transaction or an error code to be delivered instead.
1113 /// transaction stack by completing transactions for threads that are dead.
1116 reply: Result<DLArc<Transaction>, u32>, in deliver_single_reply() argument
1117 transaction: &DArc<Transaction>, in deliver_single_reply() argument
1119 if let Ok(transaction) = &reply { in deliver_single_reply()
1120 transaction.set_outstanding(&mut self.process.inner.lock()); in deliver_single_reply()
1125 if !inner.pop_transaction_replied(transaction) { in deliver_single_reply()
1146 /// Determines if the given transaction is the current transaction for this thread.
1147 fn is_current_transaction(&self, transaction: &DArc<Transaction>) -> bool { in is_current_transaction()
1151 Some(current) => Arc::ptr_eq(current, transaction), in is_current_transaction()
1155 /// Determines the current top of the transaction stack. It fails if the top is in another
1157 /// [`None`] if the thread is not currently participating in a transaction stack.
1158 fn top_of_transaction_stack(&self) -> Result<Option<DArc<Transaction>>> { in top_of_transaction_stack() argument
1162 pr_warn!("got new transaction with bad transaction stack"); in top_of_transaction_stack()
1171 fn transaction<T>(self: &Arc<Self>, tr: &BinderTransactionDataSg, inner: T) in transaction() method
1181 "Transaction failed: {:?} my_pid:{}", in transaction()
1196 // TODO: We need to ensure that there isn't a pending transaction in the work queue. How in transaction_inner()
1201 let transaction = Transaction::new(node_ref, top, self, tr)?; in transaction_inner() localVariable
1203 // Check that the transaction stack hasn't changed while the lock was released, then update in transaction_inner()
1204 // it with the new transaction. in transaction_inner()
1207 if !transaction.is_stacked_on(&inner.current_transaction) { in transaction_inner()
1208 pr_warn!("Transaction stack changed during transaction!"); in transaction_inner()
1211 inner.current_transaction = Some(transaction.clone_arc()); in transaction_inner()
1217 if let Err(e) = transaction.submit() { in transaction_inner()
1219 // Define `transaction` first to drop it after `inner`. in transaction_inner()
1220 let transaction; in transaction_inner() localVariable
1222 transaction = inner.current_transaction.take().unwrap(); in transaction_inner()
1223 inner.current_transaction = transaction.clone_next(); in transaction_inner()
1236 // We need to complete the transaction even if we cannot complete building the reply. in reply_inner()
1241 let reply = Transaction::new_reply(self, process, tr, allow_fds)?; in reply_inner()
1248 // the sender know that the transaction has completed (with an error in this case). in reply_inner()
1268 let transaction = Transaction::new(node_ref, None, self, tr)?; in oneway_transaction_inner() localVariable
1270 && transaction.oneway_spam_detected in oneway_transaction_inner()
1279 match transaction.submit() { in oneway_transaction_inner()
1303 self.transaction(&tr, Self::oneway_transaction_inner); in write()
1305 self.transaction(&tr, Self::transaction_inner); in write()
1311 self.transaction(&tr, Self::oneway_transaction_inner); in write()
1313 self.transaction(&tr, Self::transaction_inner); in write()
1318 self.transaction(&tr, Self::reply_inner) in write()
1322 self.transaction(&tr, Self::reply_inner) in write()
1584 "{}transaction error: {}\n", in debug_print()