Linux Audio

Check our new training course

Embedded Linux Audio

Check our new training course
with Creative Commons CC-BY-SA
lecture materials

Bootlin logo

Elixir Cross Referencer

Loading...
#include <signal.h>
#include <errno.h>
#include "syscall.h"

int __sigprocmask(int, const sigset_t *, sigset_t *);

int raise(int sig)
{
	int pid, tid, ret;
	sigset_t set;
	sigfillset(&set);
	__sigprocmask(SIG_BLOCK, &set, &set);
	tid = syscall0(__NR_gettid);
	pid = syscall0(__NR_getpid);
	ret = syscall3(__NR_tgkill, pid, tid, sig);
	__sigprocmask(SIG_SETMASK, &set, 0);
	return ret;
}