about summary refs log tree commit diff
path: root/src/thread/pthread_cond_broadcast.c
blob: 69f840fb4faee7d1f402771dba6f02b157a935c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include "pthread_impl.h"

int __private_cond_signal(pthread_cond_t *, int);

int pthread_cond_broadcast(pthread_cond_t *c)
{
	if (!c->_c_shared) return __private_cond_signal(c, -1);
	if (!c->_c_waiters) return 0;
	a_inc(&c->_c_seq);
	__wake(&c->_c_seq, -1, 0);
	return 0;
}