summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kse.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-07-03 19:09:59 +0000
committermtm <mtm@FreeBSD.org>2003-07-03 19:09:59 +0000
commit6f4ee681fdadfbb7008a43761f43ef8fe7d4f5c1 (patch)
tree77ce7442dc945271c4d10bcf0fc6db6bf3b8de78 /sys/kern/kern_kse.c
parent87561c3aaf68e1a2b0f3365dbecea35358f05f52 (diff)
downloadFreeBSD-src-6f4ee681fdadfbb7008a43761f43ef8fe7d4f5c1.zip
FreeBSD-src-6f4ee681fdadfbb7008a43761f43ef8fe7d4f5c1.tar.gz
Signals sent specifically to a particular thread must
be delivered to that thread, regardless of whether it has it masked or not. Previously, if the targeted thread had the signal masked, it would be put on the processes' siglist. If another thread has the signal umasked or unmasks it before the target, then the thread it was intended for would never receive it. This patch attempts to solve the problem by requiring callers of tdsignal() to say whether the signal is for the thread or for the process. If it is for the process, then normal processing occurs and any thread that has it unmasked can receive it. But if it is destined for a specific thread, it is put on that thread's pending list regardless of whether it is currently masked or not. The new behaviour still needs more work, though. If the signal is reposted for some reason it is always posted back to the thread that handled it because the information regarding the target of the signal has been lost by then. Reviewed by: jdp, jeff, bde (style)
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r--sys/kern/kern_kse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index bc71b47..4ea5231 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -413,7 +413,7 @@ kse_thr_interrupt(struct thread *td, struct kse_thr_interrupt_args *uap)
if (sig > 0) {
td2->td_flags &= ~TDF_INTERRUPT;
mtx_unlock_spin(&sched_lock);
- tdsignal(td2, sig);
+ tdsignal(td2, sig, SIGTARGET_P);
} else if (sig == 0) {
mtx_unlock_spin(&sched_lock);
} else {
OpenPOWER on IntegriCloud