shim Apple's futex primitives by joboet · Pull Request #4142 · rust-lang/miri (original) (raw)

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.