SYNOPSIS
#include <pthread.h>
int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);
DESCRIPTION
The
The
To avoid writer starvation, writers are favored over readers. Readers block while writers are waiting and writers have a greater probability of waking up once blocked.
When a thread waiting to acquire a write lock receives a signal, that thread, upon return from the signal handler, resumes waiting as though no interruption occurred.
PARAMETERS
RETURN VALUES
On success, the
- EBUSY
-
A write lock was unable to be acquired because rwlock was already locked for reading or writing.
- EDEADLK
-
The current thread already owns the read-write lock for writing.
- EINVAL
-
The rwlock argument does not point to an initialized read-write lock object.
CONFORMANCE
UNIX 03.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
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
SEE ALSO
- Functions:
pthread_rwlock_destroy() ,pthread_rwlock_rdlock() ,pthread_rwlock_timedrdlock() ,pthread_rwlock_timedwrlock() ,pthread_rwlock_tryrdlock() ,pthread_rwlock_unlock()
PTC MKS Toolkit 10.5 Documentation Build 40.