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

Function tdsigcleanup

freebsd/kern/kern_sig.c:2727–2753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2725}
2726
2727void
2728tdsigcleanup(struct thread *td)
2729{
2730 struct proc *p;
2731 sigset_t unblocked;
2732
2733 p = td->td_proc;
2734 PROC_LOCK_ASSERT(p, MA_OWNED);
2735
2736 sigqueue_flush(&td->td_sigqueue);
2737 if (p->p_numthreads == 1)
2738 return;
2739
2740 /*
2741 * Since we cannot handle signals, notify signal post code
2742 * about this by filling the sigmask.
2743 *
2744 * Also, if needed, wake up thread(s) that do not block the
2745 * same signals as the exiting thread, since the thread might
2746 * have been selected for delivery and woken up.
2747 */
2748 SIGFILLSET(unblocked);
2749 SIGSETNAND(unblocked, td->td_sigmask);
2750 SIGFILLSET(td->td_sigmask);
2751 reschedule_signals(p, unblocked, 0);
2752
2753}
2754
2755static int
2756sigdeferstop_curr_flags(int cflags)

Callers 2

kern_thr_exitFunction · 0.85
kthread_exitFunction · 0.85

Calls 2

sigqueue_flushFunction · 0.85
reschedule_signalsFunction · 0.85

Tested by

no test coverage detected