Multithreaded Programming Guide

pthread_rwlock_trywrlock Return Values

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.


EBUSY

Description:

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