1 #include <signal.h> 2 #include <string.h> 3 #include <unistd.h> 4 #include <unsupported_api.h> 5 6 #include "syscall.h" 7 #include "pthread_impl.h" 8 sigqueue(pid_t pid,int sig,const union sigval value)9int sigqueue(pid_t pid, int sig, const union sigval value) 10 { 11 siginfo_t si; 12 sigset_t set; 13 int r; 14 unsupported_api(__FUNCTION__); 15 memset(&si, 0, sizeof si); 16 si.si_signo = sig; 17 si.si_code = SI_QUEUE; 18 si.si_value = value; 19 si.si_uid = getuid(); 20 __block_app_sigs(&set); 21 si.si_pid = getpid(); 22 r = syscall(SYS_rt_sigqueueinfo, pid, sig, &si); 23 __restore_sigs(&set); 24 return r; 25 } 26