shithub: npe

ref: e8d44e6791e9568d0a4e3291d15692f9223870f1
dir: /libnpe_pthread/pthread_cond_wait.c/

View raw version
#include "_pthread.h"

int
pthread_cond_wait(pthread_cond_t *const cond, pthread_mutex_t *const mutex)
{
	qlock(cond->l);
	qunlock(mutex);
	rsleep(cond);
	qunlock(cond->l);
	qlock(mutex);

	return 0;
}