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 🔒