Multithreaded Programming Guide

pthread_rwlock_timedwrlock Returns

If successful, returns 0 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.


ETIMEDOUT

Description:

The lock could not be acquired before the specified timeout expired.


EDEADLK

Description:

The calling thread already holds the rwlock.


EINVAL

Description:

The value specified by rwlock does not refer to an initialized read-write lock object, or the timeout nanosecond value is less than zero or greater than or equal to 1,000 million.