miri::shims::unix

Module sync

Source

Structs§

PthreadCondvar πŸ”’
PthreadMutex πŸ”’
PthreadRwLock πŸ”’

Enums§

ClockId πŸ”’
MutexKind πŸ”’
The mutex kind.

Constants§

PTHREAD_MUTEX_KIND_UNCHANGED πŸ”’
To differentiate β€œthe mutex kind has not been changed” from β€œthe mutex kind has been set to PTHREAD_MUTEX_DEFAULT and that is equal to some other mutex kind”, we make the default value of this field not PTHREAD_MUTEX_DEFAULT but this special flag.

Traits§

EvalContextExt

Functions§

bytewise_equal_atomic_relaxed πŸ”’
Do a bytewise comparison of the two places, using relaxed atomic reads. This is used to check if a synchronization primitive matches its static initializer value.
cond_create πŸ”’
cond_get_data πŸ”’
cond_init_offset πŸ”’
condattr_clock_offset πŸ”’
condattr_get_clock_id πŸ”’
condattr_set_clock_id πŸ”’
condattr_translate_clock_id πŸ”’
Translates the clock from what is stored in pthread_condattr_t to our enum.
mutex_create πŸ”’
Eagerly create and initialize a new mutex.
mutex_get_data πŸ”’
Returns the mutex data stored at the address that mutex_ptr points to. Will raise an error if the mutex has been moved since its first use.
mutex_init_offset πŸ”’
To ensure an initialized mutex that was moved somewhere else can be distinguished from a statically initialized mutex that is used the first time, we pick some offset within pthread_mutex_t and use it as an β€œinitialized” flag.
mutex_kind_from_static_initializer πŸ”’
Returns the kind of a static initializer.
mutexattr_get_kind πŸ”’
mutexattr_kind_offset πŸ”’
mutexattr_set_kind πŸ”’
mutexattr_translate_kind πŸ”’
Translates the mutex kind from what is stored in pthread_mutexattr_t to our enum.
rwlock_get_data πŸ”’
rwlock_init_offset πŸ”’