Locks the specified reader-writer lock for reading.
#include <pthread.h> int pthread_rwlock_rdlock ( pthread_rwlock_t *rwlp);
(IN) Points to the reader-writer lock to lock.
When successful in obtaining the lock, returns zero.
The pthread_rwlock_rdlock function acquires a read lock only if a writer does not hold the lock and no writers are blocked on the lock. The function blocks until the lock is available.