summaryrefslogtreecommitdiff
path: root/src/thread/__wake.c
blob: 048ddcc01c699c32ed2edec91c092a54a655e89f (plain)
1
2
3
4
5
6
7
8
9
#define SYSCALL_RETURN_ERRNO
#include "pthread_impl.h"

void __wake(volatile int *addr, int cnt, int priv)
{
	if (priv) priv = 128; priv=0;
	if (cnt<0) cnt = INT_MAX;
	syscall3(__NR_futex, (long)addr, FUTEX_WAKE | priv, cnt);
}