View | Details | Raw Unified | Return to bug 244250
Collapse All | Expand All

(-)b/sys/kern/subr_trap.c (-5 / +7 lines)
Lines 326-346 ast(struct trapframe *framep) Link Here
326
	if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 ||
326
	if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 ||
327
	    !SIGISEMPTY(p->p_siglist)) {
327
	    !SIGISEMPTY(p->p_siglist)) {
328
		sigfastblock_fetch(td);
328
		sigfastblock_fetch(td);
329
		PROC_LOCK(p);
330
		mtx_lock(&p->p_sigacts->ps_mtx);
331
		if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 &&
329
		if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 &&
332
		    td->td_sigblock_val != 0) {
330
		    td->td_sigblock_val != 0) {
333
			sigfastblock_setpend(td);
331
			sigfastblock_setpend(td);
332
			PROC_LOCK(p);
334
			reschedule_signals(p, fastblock_mask,
333
			reschedule_signals(p, fastblock_mask,
335
			    SIGPROCMASK_PS_LOCKED | SIGPROCMASK_FASTBLK);
334
			    SIGPROCMASK_FASTBLK);
335
			PROC_UNLOCK(p);
336
		} else {
336
		} else {
337
			PROC_LOCK(p);
338
			mtx_lock(&p->p_sigacts->ps_mtx);
337
			while ((sig = cursig(td)) != 0) {
339
			while ((sig = cursig(td)) != 0) {
338
				KASSERT(sig >= 0, ("sig %d", sig));
340
				KASSERT(sig >= 0, ("sig %d", sig));
339
				postsig(sig);
341
				postsig(sig);
340
			}
342
			}
343
			mtx_unlock(&p->p_sigacts->ps_mtx);
344
			PROC_UNLOCK(p);
341
		}
345
		}
342
		mtx_unlock(&p->p_sigacts->ps_mtx);
343
		PROC_UNLOCK(p);
344
	}
346
	}
345
347
346
	/*
348
	/*

Return to bug 244250