Skip to content

Commit a9ca270

Browse files
committed
fix two futex comments
1 parent 1dc7173 commit a9ca270

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/shims/unix/macos/sync.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
132132

133133
let is_shared = flags == shared;
134134
let timeout = clock_timeout.map(|(_, anchor, timeout)| {
135+
// The only clock that is currenlty supported is the monotonic clock.
136+
// While the deadline argument of `os_sync_wait_on_address_with_deadline`
137+
// is actually not in nanoseconds but in the units of `mach_current_time`,
138+
// the two are equivalent in miri.
135139
(TimeoutClock::Monotonic, anchor, Duration::from_nanos(timeout))
136140
});
137141

tests/pass-dep/concurrency/apple-futex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{io, ptr, thread};
66
fn wake_nobody() {
77
let futex = 0;
88

9-
// Wake 1 waiter. Expect ENOENT woken up, as nobody is waiting.
9+
// Wake 1 waiter. Expect ENOENT as nobody is waiting.
1010
unsafe {
1111
assert_eq!(
1212
libc::os_sync_wake_by_address_any(

0 commit comments

Comments
 (0)