aboutsummaryrefslogtreecommitdiff
path: root/src/signal/raise.c
blob: b65d8c22ea2d087f0287ad2b36f6ede3bce12a95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <signal.h>
#include <stdint.h>
#include "syscall.h"
#include "pthread_impl.h"

int raise(int sig)
{
	sigset_t set;
	__block_app_sigs(&set);
	int ret = syscall(SYS_tkill, __pthread_self()->tid, sig);
	__restore_sigs(&set);
	return ret;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif