Read/write mutexes
Type of r/w mutexes
Preference for readers, writers, or no preference
Preference kind of read/write mutexes
r_pref preference kind for readers.
r_pref
w_pref preference kind for writers.
w_pref
np_pref no preference for readers or writers.
np_pref
create pref
pref
r_lock mtx locks mtx for a reader.
r_lock mtx
mtx
r_unlock mtx unlocks mtx for a reader.
r_unlock mtx
w_lock mtx locks mtx for a writer.
w_lock mtx
w_unlock mtx unlocks mtx for a writer.
w_unlock mtx
try_r_lock mtx tries to lock mtx for a reader without blocking.
try_r_lock mtx
true
false
try_w_lock mtx tries to lock mtx for a writer without blocking.
try_w_lock mtx
wrap_r_lock mtx f locks mtx for a reader, executes f and unlocks the mutex again.
wrap_r_lock mtx f
f
try_wrap_r_lock mtx f tries to lock mtx for a reader without blocking, executes f and unlocks the mutex again.
try_wrap_r_lock mtx f
Some res
res
None
btry_wrap_r_lock mtx f tries to lock mtx for a reader without blocking, executes f and unlocks the mutex again.
btry_wrap_r_lock mtx f
wrap_w_lock mtx f locks mtx for a writer, executes f and unlocks the mutex again.
wrap_w_lock mtx f
try_wrap_w_lock mtx f tries to lock mtx for a writer without blocking, executes f and unlocks the mutex again.
try_wrap_w_lock mtx f
btry_wrap_w_lock mtx f tries to lock mtx for a writer without blocking, executes f and unlocks the mutex again.
btry_wrap_w_lock mtx f