int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
The calling thread acquires the lock when a writer does not hold the lock and there are writers blocked on the lock. When a writer holds the lock, the calling thread does not acquire the read lock. When the read lock is not acquired, the calling thread blocks until the lock can be acquired. The calling thread may detect a deadlock (and return EDEADLK) if at the time the call is made it holds a write lock.
A thread may hold multiple concurrent read locks on the specified
rwlock argument (that is, it can successfully call
No more than sizeof(unsigned long) simultaneous read locks can be applied to a read-write lock.
When a thread waiting for a read-write lock for reading receives a signal, that thread, upon return from the signal handler, resumes waiting for the read-write lock for reading as if no interruption occurred.
On success, the
No read lock was acquired because the maximum number of read locks for rwlock was exceeded.
A writer holds the lock and thus, the read-write lock could not be acquired.
The current thread already owns the read-write lock for writing.
The rwlock attribute points to a value that is not an initialized read-write lock object.
Currently, sizeof(unsigned long) is 32 bits for all systems on which the NuTCRACKER Platform runs.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
pthread_rwlock_destroy(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), pthread_rwlock_wrlock()
PTC MKS Toolkit 10.3 Documentation Build 39.