Skip to main content

Module sync

Module 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. FIXME: synchronize behavior on lock copies/moves with macOS guarantees. Apparently there is hope that macOS might eventually guarantee more than it does today.

StructsΒ§

MacOsFutex πŸ”’
Metadata for a macOS futex.
MacOsSemaphore πŸ”’

EnumsΒ§

MacOsFutexTimeout
MacOsUnfairLock πŸ”’

ConstantsΒ§

DISPATCH_TIME_FOREVER πŸ”’
DISPATCH_TIME_NOW πŸ”’
SEM_INIT_OFFSET πŸ”’
SYNC_INIT πŸ”’
SYNC_UNINIT πŸ”’

TraitsΒ§

EvalContextExt
EvalContextExtPriv πŸ”’