Synopsis
void ctl_rwlock_init(CTL_RWLOCK_t *rwlock,
                     unsigned max_readers);
Description

ctl_rwlock_init initializes the read-write lock rwlock for simultaneous access by at most max_readers without blocking or for exclusive access by one writer.

Increasing the maximum number of simultaneous readers has no effect on the memory requires to realise the lock, however it does increase the time required to acquire an exclusive write lock using ctl_rwlock_write_lock or ctl_rw_write_lock_claim.