From owner-cvs-src@FreeBSD.ORG Thu Jul 3 12:10:00 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2738137B401; Thu, 3 Jul 2003 12:10:00 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BEE243F85; Thu, 3 Jul 2003 12:09:59 -0700 (PDT) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h63J9x0U070185; Thu, 3 Jul 2003 12:09:59 -0700 (PDT) (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h63J9xvl070184; Thu, 3 Jul 2003 12:09:59 -0700 (PDT) Message-Id: <200307031909.h63J9xvl070184@repoman.freebsd.org> From: Mike Makonnen Date: Thu, 3 Jul 2003 12:09:59 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_sig.c kern_thr.c kern_thread.c src/sys/sys signalvar.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 19:10:01 -0000 mtm 2003/07/03 12:09:59 PDT FreeBSD src repository Modified files: sys/kern kern_sig.c kern_thr.c kern_thread.c sys/sys signalvar.h Log: 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) Revision Changes Path 1.248 +14 -12 src/sys/kern/kern_sig.c 1.11 +1 -5 src/sys/kern/kern_thr.c 1.149 +1 -1 src/sys/kern/kern_thread.c 1.63 +8 -1 src/sys/sys/signalvar.h