Skip to content

Commit ed43db5

Browse files
committed
code formatting
1 parent 684a32d commit ed43db5

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/process/threading/futex/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ pub fn requeue_key(key1: FutexKey, key2: FutexKey, nr_wake: usize, nr_requeue: u
135135
/// Waits on a single futex word, the common case shared by the legacy
136136
/// `FUTEX_WAIT` ops and futex2 `sys_futex_wait`. Interruption (and recovery of
137137
/// a wake that raced a signal) is handled inside [`futex_wait_multi`].
138-
pub(super) async fn futex_wait_single(waiter: ParsedWaiter, timeout: Option<Deadline>) -> Result<usize> {
138+
pub(super) async fn futex_wait_single(
139+
waiter: ParsedWaiter,
140+
timeout: Option<Deadline>,
141+
) -> Result<usize> {
139142
// Return 0 on success.
140143
futex_wait_multi(core::slice::from_ref(&waiter), timeout)
141144
.await

src/process/threading/futex/wait.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,8 @@ pub async fn futex_wait_multi(
170170
// race window, so `finish()` reports it and we return success in
171171
// that case rather than losing the wake. Otherwise it is the
172172
// genuine timeout / interrupt result.
173-
InterruptResult::Uninterrupted(_) => {
174-
guard.finish().ok_or(KernelError::TimedOut)
175-
}
176-
InterruptResult::Interrupted => {
177-
guard.finish().ok_or(KernelError::Interrupted)
178-
}
173+
InterruptResult::Uninterrupted(_) => guard.finish().ok_or(KernelError::TimedOut),
174+
InterruptResult::Interrupted => guard.finish().ok_or(KernelError::Interrupted),
179175
};
180176
}
181177
}

usertest/src/futex2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,10 @@ fn test_futex2_requeue_to_self() {
603603
unsafe {
604604
let ret = futex2_requeue(pair.as_ptr(), 0, 1, 1);
605605
if ret != -1 || errno() != libc::EINVAL {
606-
panic!("requeue-to-self: ret {ret}, errno {}, expected EINVAL", errno());
606+
panic!(
607+
"requeue-to-self: ret {ret}, errno {}, expected EINVAL",
608+
errno()
609+
);
607610
}
608611
}
609612

0 commit comments

Comments
 (0)