blob: cc2b19b755df641e4e2a4b4aa30e88339efb166c (
plain) (
tree)
|
|
#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;
}
|