summaryrefslogtreecommitdiff
path: root/src/thread/pthread_rwlock_rdlock.c
blob: 29863507c07453336e4513f6250d9991d2037f9c (plain) (blame)
1
2
3
4
5
6
7
8
#include "pthread_impl.h"

int pthread_rwlock_rdlock(pthread_rwlock_t *rw)
{
	while (pthread_rwlock_tryrdlock(rw))
		__wait(&rw->_rw_wrlock, &rw->_rw_waiters, 1, 0);
	return 0;
}