summaryrefslogtreecommitdiff
path: root/src/thread/pthread_kill.c
blob: d9a5096a06751781cc3c5d6ac5c923b7cc78d500 (plain)
1
2
3
4
5
6
7
8
9
10
#include "pthread_impl.h"

int pthread_kill(pthread_t t, int sig)
{
	int r;
	__lock(t->killlock);
	r = t->dead ? ESRCH : -__syscall(SYS_tgkill, t->pid, t->tid, sig);
	__unlock(t->killlock);
	return r;
}