-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shim Apple's futex primitives #4142
Conversation
Thanks for the PR! I just left for a 1-week business trip and will have to catch up with stuff when I am back so it could take a bit before I can take a closer look. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Overall approach looks great, but I have a bunch of questions and comments. :)
|
||
let is_shared = flags == shared; | ||
let timeout = clock_timeout.map(|(_, anchor, timeout)| { | ||
(TimeoutClock::Monotonic, anchor, Duration::from_nanos(timeout)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment making that connection.
@rustbot ready |
This looks great, thanks! Please squash the commits, then we can land this. Please use the @rustbot author |
This is necessary to unblock rust-lang/rust#122408. The documentation for these is available [here](https://developer.apple.com/documentation/os/os_sync_wait_on_address?language=objc). Because the futex wait operations (`os_sync_wait_on_address` et al.) return the number of remaining waiters after returning, this required some changes to the common futex infrastructure, which I've changed to take a callback instead of precalculating the return values.
@rustbot ready |
This is necessary to unblock rust-lang/rust#122408. The documentation for these is available here.
Because the futex wait operations (
os_sync_wait_on_address
et al.) return the number of remaining waiters after returning, this required some changes to the common futex infrastructure, which I've changed to take a callback instead of precalculating the return values.