Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
Show First 20 Lines • Show All 2,310 Lines • ▼ Show 20 Lines | if (prop & SIGPROP_CONT) { | ||||
childproc_continued(p); | childproc_continued(p); | ||||
PROC_UNLOCK(p->p_pptr); | PROC_UNLOCK(p->p_pptr); | ||||
PROC_SLOCK(p); | PROC_SLOCK(p); | ||||
} | } | ||||
if (action == SIG_DFL) { | if (action == SIG_DFL) { | ||||
thread_unsuspend(p); | thread_unsuspend(p); | ||||
PROC_SUNLOCK(p); | PROC_SUNLOCK(p); | ||||
sigqueue_delete(sigqueue, sig); | sigqueue_delete(sigqueue, sig); | ||||
goto out; | goto out_cont; | ||||
} | } | ||||
if (action == SIG_CATCH) { | if (action == SIG_CATCH) { | ||||
/* | /* | ||||
* The process wants to catch it so it needs | * The process wants to catch it so it needs | ||||
* to run at least one thread, but which one? | * to run at least one thread, but which one? | ||||
*/ | */ | ||||
PROC_SUNLOCK(p); | PROC_SUNLOCK(p); | ||||
goto runfast; | goto runfast; | ||||
} | } | ||||
/* | /* | ||||
* The signal is not ignored or caught. | * The signal is not ignored or caught. | ||||
*/ | */ | ||||
thread_unsuspend(p); | thread_unsuspend(p); | ||||
PROC_SUNLOCK(p); | PROC_SUNLOCK(p); | ||||
goto out; | goto out_cont; | ||||
} | } | ||||
if (prop & SIGPROP_STOP) { | if (prop & SIGPROP_STOP) { | ||||
/* | /* | ||||
* If traced process is already stopped, | * If traced process is already stopped, | ||||
* then no further action is necessary. | * then no further action is necessary. | ||||
*/ | */ | ||||
if (p->p_flag & P_TRACED) | if (p->p_flag & P_TRACED) | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) | ||||
* The process is not stopped so we need to apply the signal to all the | * The process is not stopped so we need to apply the signal to all the | ||||
* running threads. | * running threads. | ||||
*/ | */ | ||||
runfast: | runfast: | ||||
tdsigwakeup(td, sig, action, intrval); | tdsigwakeup(td, sig, action, intrval); | ||||
PROC_SLOCK(p); | PROC_SLOCK(p); | ||||
thread_unsuspend(p); | thread_unsuspend(p); | ||||
PROC_SUNLOCK(p); | PROC_SUNLOCK(p); | ||||
out_cont: | |||||
itimer_proc_continued(p); | |||||
kqtimer_proc_continued(p); | |||||
out: | out: | ||||
/* If we jump here, proc slock should not be owned. */ | /* If we jump here, proc slock should not be owned. */ | ||||
PROC_SLOCK_ASSERT(p, MA_NOTOWNED); | PROC_SLOCK_ASSERT(p, MA_NOTOWNED); | ||||
if (wakeup_swapper) | if (wakeup_swapper) | ||||
kick_proc0(); | kick_proc0(); | ||||
return (ret); | return (ret); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,827 Lines • Show Last 20 Lines |