Expand description
Waiting on a shared 32-bit word, the primitive under every “wake me when this changes” in Orbit: ring readiness, cell changes.
wait_word parks the caller until the word no longer holds expected
(or spuriously; callers loop). wake_word wakes every waiter on it. The
word may live in shared memory: Linux futex, FreeBSD umtx and macOS
os_sync_wait_on_address all key waiters by the physical location, so a
wake in one process reaches a waiter in another with nothing carried
between them. No descriptor, no channel: the memory is the signal.
macOS needs 14.4 for the shared form. Below that there is no wait to
be had, and supported says so: a crate that parks on words refuses
to open rather than pretending, because a sleep loop wearing the shape
of a wait is worse than a clear no.
Functions§
- supported
- Whether this build can park on a shared word at all.
- wait_
word - wait_
word_ timeout - Park until the word no longer holds
expected, ortimeoutpasses. - wake_
word