Module miri::shims::unix::macos::sync

source ·
Expand description

Contains macOS-specific synchronization functions.

For os_unfair_lock, see the documentation https://developer.apple.com/documentation/os/synchronization?language=objc and in case of underspecification its implementation https://github.com/apple-oss-distributions/libplatform/blob/a00a4cc36da2110578bcf3b8eeeeb93dcc7f4e11/src/os/lock.c#L645.

Note that we don’t emulate every edge-case behaviour of the locks. Notably, we don’t abort when locking a lock owned by a thread that has already exited and we do not detect copying of the lock, but macOS doesn’t guarantee anything in that case either.

Traits§