Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > rwmtx_timedwrlock (3)
HTML TXT PDF PS
rwmtx_timedwrlock(3) Library Functions Manual rwmtx_timedwrlock(3)

rwmtx_timedwrlockattempt to acquire a read-write lock with timeout

library “threads”
#include <threadse.h>

int
rwmtx_timedwrlock(rwmtx_t *rw, const struct timespec *ts);

The function () will acquire a timed read-write lock on the given rw. If the lock can not be acquired at this time the function will wait up to time time specified by ts before giving up.

Upon success rwmtx_timedwrlock() will return thrd_success if the lock could not be acquired in time thrd_timeout will be returned. In case of error thrd_error will be returned.

rwmtx_init(3) rwmtx_destroy(3) rwmtx_wrlock(3) rwmtx_rdlock(3) rwmtx_trywrlock(3) rwmtx_trywrlock(3) rwmtx_timedrdlock(3) rwmtx_unlock(3)

The rwmtx_timedwrlock() function first appeared in the Adelsbach Enhanced Threading Library.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian