| 2725 | } |
| 2726 | |
| 2727 | void |
| 2728 | tdsigcleanup(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 | |
| 2755 | static int |
| 2756 | sigdeferstop_curr_flags(int cflags) |
no test coverage detected