#include <synch.h> (or #include <thread.h>) int rw_tryrdlock(rwlock_t *rwlp);
When the read-write lock is already locked for writing, rw_tryrdlock() returns an error. Otherwise, the read lock is acquired. For POSIX threads, see pthread_rwlock_tryrdlock Syntax.