Multithreaded Programming Guide

Return Value

If successful, pthread_rwlock_trywrlock() returns zero if the lock for writing on the read-write lock object referenced by rwlock is acquired. Otherwise, an error number is returned to indicate the error.


The read-write lock could not be acquired for writing because it is already locked for reading or writing.