MCPcopy Create free account
hub / github.com/F-Stack/f-stack / postsig_done

Function postsig_done

freebsd/kern/kern_sig.c:1986–2000  ·  view source on GitHub ↗

* Recalculate the signal mask and reset the signal disposition after * usermode frame for delivery is formed. Should be called after * mach-specific routine, because sysent->sv_sendsig() needs correct * ps_siginfo and signal mask. */

Source from the content-addressed store, hash-verified

1984 * ps_siginfo and signal mask.
1985 */
1986static void
1987postsig_done(int sig, struct thread *td, struct sigacts *ps)
1988{
1989 sigset_t mask;
1990
1991 mtx_assert(&ps->ps_mtx, MA_OWNED);
1992 td->td_ru.ru_nsignals++;
1993 mask = ps->ps_catchmask[_SIG_IDX(sig)];
1994 if (!SIGISMEMBER(ps->ps_signodefer, sig))
1995 SIGADDSET(mask, sig);
1996 kern_sigprocmask(td, SIG_BLOCK, &mask, NULL,
1997 SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED);
1998 if (SIGISMEMBER(ps->ps_sigreset, sig))
1999 sigdflt(ps, sig);
2000}
2001
2002/*
2003 * Send a signal caused by a trap to the current thread. If it will be

Callers 2

trapsignalFunction · 0.85
postsigFunction · 0.85

Calls 3

mtx_assertFunction · 0.85
kern_sigprocmaskFunction · 0.85
sigdfltFunction · 0.85

Tested by

no test coverage detected