Skip to content

Commit ee130ad

Browse files
committed
update outdated comment about not returning EINVAL when you requeue a futex on itself
1 parent 10aac3e commit ee130ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

usertest/src/futex2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ register_test!(test_futex2_wake_no_waiters);
567567

568568
fn test_futex2_requeue_to_self() {
569569
// Requeueing a futex onto itself (uaddr1 == uaddr2) is rejected with
570-
// EINVAL on Linux. moss currently short-circuits this to a plain wake and
571-
// returns success, silently dropping nr_requeue -- this test encodes the
572-
// Linux contract and is expected to fail until that is fixed.
570+
// EINVAL, matching Linux. moss detects key1 == key2 before requeueing
571+
// (this also catches distinct virtual addresses aliasing one shared
572+
// frame); this test guards against that reject regressing.
573573
let f = Arc::new(AtomicU32::new(0));
574574
let woken = Arc::new(AtomicU32::new(0));
575575

0 commit comments

Comments
 (0)