summaryrefslogtreecommitdiff
path: root/src/signal/raise.c
blob: 717b1c917a34311ab514c7955e995c2fbad140b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <signal.h>
#include <stdint.h>
#include "syscall.h"
#include "pthread_impl.h"

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