1570af302Sopenharmony_ci#include <signal.h> 2570af302Sopenharmony_ci#include <string.h> 3570af302Sopenharmony_ci#include <unistd.h> 4570af302Sopenharmony_ci#include "syscall.h" 5570af302Sopenharmony_ci#include "pthread_impl.h" 6570af302Sopenharmony_ci#include <unsupported_api.h> 7570af302Sopenharmony_ci 8570af302Sopenharmony_ciint sigqueue(pid_t pid, int sig, const union sigval value) 9570af302Sopenharmony_ci{ 10570af302Sopenharmony_ci UNSUPPORTED_API_VOID(LITEOS_A); 11570af302Sopenharmony_ci siginfo_t si; 12570af302Sopenharmony_ci sigset_t set; 13570af302Sopenharmony_ci int r; 14570af302Sopenharmony_ci memset(&si, 0, sizeof si); 15570af302Sopenharmony_ci si.si_signo = sig; 16570af302Sopenharmony_ci si.si_code = SI_QUEUE; 17570af302Sopenharmony_ci si.si_value = value; 18570af302Sopenharmony_ci si.si_uid = getuid(); 19570af302Sopenharmony_ci __block_app_sigs(&set); 20570af302Sopenharmony_ci si.si_pid = getpid(); 21570af302Sopenharmony_ci r = syscall(SYS_rt_sigqueueinfo, pid, sig, &si); 22570af302Sopenharmony_ci __restore_sigs(&set); 23570af302Sopenharmony_ci return r; 24570af302Sopenharmony_ci} 25