Home | History | Annotate | Download | only in rtl

Lines Matching refs:sig

92 typedef void (*sighandler_t)(int sig);
99 void (*sa_sigaction)(int sig, my_siginfo_t *siginfo, void *uctx);
1687 int sig, my_siginfo_t *info, void *uctx) {
1693 (uptr)sigactions[sig].sa_sigaction :
1694 (uptr)sigactions[sig].sa_handler;
1697 sigactions[sig].sa_sigaction(sig, info, uctx);
1699 sigactions[sig].sa_handler(sig);
1707 if (flags()->report_bugs && !sync && sig != SIGTERM && errno != 99) {
1730 for (int sig = 0; sig < kSigCount; sig++) {
1731 SignalDesc *signal = &sctx->pending_signals[sig];
1734 if (sigactions[sig].sa_handler != SIG_DFL
1735 && sigactions[sig].sa_handler != SIG_IGN) {
1737 sig, &signal->siginfo, &signal->ctx);
1748 static bool is_sync_signal(SignalContext *sctx, int sig) {
1749 return sig == SIGSEGV || sig == SIGBUS || sig == SIGILL ||
1750 sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE || sig == SIGSYS ||
1752 (sctx && sig == sctx->int_signal_send);
1755 void ALWAYS_INLINE rtl_generic_sighandler(bool sigact, int sig,
1759 if (sig < 0 || sig >= kSigCount) {
1760 VPrintf(1, "ThreadSanitizer: ignoring signal %d\n", sig);
1764 const bool sync = is_sync_signal(sctx, sig);
1777 CallUserSignalHandler(thr, sync, sigact, sig, info, ctx);
1780 CallUserSignalHandler(thr, sync, sigact, sig, info, ctx);
1789 SignalDesc *signal = &sctx->pending_signals[sig];
1801 static void rtl_sighandler(int sig) {
1802 rtl_generic_sighandler(false, sig, 0, 0);
1805 static void rtl_sigaction(int sig, my_siginfo_t *info, void *ctx) {
1806 rtl_generic_sighandler(true, sig, info, ctx);
1809 TSAN_INTERCEPTOR(int, sigaction, int sig, sigaction_t *act, sigaction_t *old) {
1810 SCOPED_TSAN_INTERCEPTOR(sigaction, sig, act, old);
1812 internal_memcpy(old, &sigactions[sig], sizeof(*old));
1815 internal_memcpy(&sigactions[sig], act, sizeof(*act));
1825 int res = REAL(sigaction)(sig, &newact, 0);
1829 TSAN_INTERCEPTOR(sighandler_t, signal, int sig, sighandler_t h) {
1835 int res = sigaction(sig, &act, &old);
1846 TSAN_INTERCEPTOR(int, raise, int sig) {
1847 SCOPED_TSAN_INTERCEPTOR(raise, sig);
1851 sctx->int_signal_send = sig;
1852 int res = REAL(raise)(sig);
1853 CHECK_EQ(sctx->int_signal_send, sig);
1858 TSAN_INTERCEPTOR(int, kill, int pid, int sig) {
1859 SCOPED_TSAN_INTERCEPTOR(kill, pid, sig);
1864 sctx->int_signal_send = sig;
1866 int res = REAL(kill)(pid, sig);
1868 CHECK_EQ(sctx->int_signal_send, sig);
1874 TSAN_INTERCEPTOR(int, pthread_kill, void *tid, int sig) {
1875 SCOPED_TSAN_INTERCEPTOR(pthread_kill, tid, sig);
1880 sctx->int_signal_send = sig;
1882 int res = REAL(pthread_kill)(tid, sig);
1884 CHECK_EQ(sctx->int_signal_send, sig);