summaryrefslogtreecommitdiff
path: root/src/thread/pthread_rwlock_rdlock.c
blob: 6bcdb81544d19667f498a4f3fbfef37c3c393ea4 (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->__wrlock, &rw->__waiters, 1, 0);
	return 0;
}