Skip to content

Commit 319a82d

Browse files
wedsonafojeda
andauthored
Apply suggestions from code review
Co-authored-by: Miguel Ojeda <[email protected]>
1 parent d8dcaf8 commit 319a82d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/android/thread.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ impl Thread {
264264
self.inner.lock().current_transaction = Some(transaction);
265265
}
266266

267-
/// Attemps to fetch a work item from the thread-local queue. The behaviour if it the queue is
267+
/// Attempts to fetch a work item from the thread-local queue. The behaviour if the queue is
268268
/// empty depends on `wait`: if it is true, the function waits for some work to be queued (or a
269-
/// signal); otherwise it returns indicating that none is avaible.
269+
/// signal); otherwise it returns indicating that none is available.
270270
fn get_work_local(self: &Arc<Self>, wait: bool) -> KernelResult<Arc<dyn DeliverToRead>> {
271271
// Try once if the caller does not want to wait.
272272
if !wait {
@@ -291,7 +291,7 @@ impl Thread {
291291
}
292292
}
293293

294-
/// Attemps to fetch a work item from the thread-local queue, falling back to the process-wide
294+
/// Attempts to fetch a work item from the thread-local queue, falling back to the process-wide
295295
/// queue if none is available locally.
296296
///
297297
/// This must only be called when the thread is not participating in a transaction chain. If it
@@ -354,7 +354,7 @@ impl Thread {
354354
Ok(())
355355
}
356356

357-
/// Attemps to push to given work item to the thread if it's a looper thread (i.e., if it's
357+
/// Attempts to push to given work item to the thread if it's a looper thread (i.e., if it's
358358
/// part of a thread pool) and is alive. Otherwise, push the work item to the process instead.
359359
pub(crate) fn push_work_if_looper(&self, work: Arc<dyn DeliverToRead>) -> BinderResult {
360360
let mut inner = self.inner.lock();
@@ -541,7 +541,7 @@ impl Thread {
541541
Ok(())
542542
})()
543543
.map_err(|mut err| {
544-
// At this point we only return BR_TRANSACTION_COMPLETE to the caller, and we must let
544+
// At this point we only return `BR_TRANSACTION_COMPLETE` to the caller, and we must let
545545
// the sender know that the transaction has completed (with an error in this case).
546546
let reply = Either::Right(BR_FAILED_REPLY);
547547
orig.from.deliver_reply(reply, &orig);
@@ -552,7 +552,7 @@ impl Thread {
552552

553553
/// Determines the current top of the transaction stack. It fails if the top is in another
554554
/// thread (i.e., this thread belongs to a stack but it has called another thread). The top is
555-
/// `None` if the thread is not currently participating in a transaction stack.
555+
/// [`None`] if the thread is not currently participating in a transaction stack.
556556
fn top_of_transaction_stack(&self) -> KernelResult<Option<Arc<Transaction>>> {
557557
let inner = self.inner.lock();
558558
Ok(if let Some(cur) = &inner.current_transaction {

0 commit comments

Comments
 (0)