From owner-freebsd-questions@FreeBSD.ORG Sun Nov 12 06:37:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3F4016A412 for ; Sun, 12 Nov 2006 06:37:37 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72F2D43D69 for ; Sun, 12 Nov 2006 06:37:37 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kAC6bawm027802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 11 Nov 2006 22:37:36 -0800 X-Auth-Received: from [192.168.0.104] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kAC6bZCD025951 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Sat, 11 Nov 2006 22:37:36 -0800 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <562718.15358.qm@web72013.mail.tp2.yahoo.com> References: <562718.15358.qm@web72013.mail.tp2.yahoo.com> X-Gpgmail-State: !signed Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <9EA5F6DB-1EB9-4092-A92D-DE452A13BF0B@u.washington.edu> Content-Transfer-Encoding: 7bit From: Garrett Cooper Date: Sat, 11 Nov 2006 22:37:40 -0800 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.752.2) X-PMX-Version: 5.2.1.279297, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.11.222433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Subject: Re: signal design questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 06:37:37 -0000 On Nov 11, 2006, at 10:55 AM, Wenyen, Shih wrote: > Hi all, > I have some questions. > (1) I know how to delivery of a signal to a > process. > > 1. The kernel places a signal context on the > user's stack.(user level) > 2. The kernel places a signal-handler frame on > the user's stack.(kernel level) > 3. The user's signal handler returns to the > sigtramp() routine, which pops the signal-handler > context from the user's stack.(user level) > 4. The sigtramp() routine finishes by calling > the sigreturn system call. > > But, why don't implement signal handler routine > in kernel level? Are there having any ideas to > implement signal handler routine in kernel level? > > > (2) The system-call exit code first checks for a > posted signal and check to see whether any process has > a priority higher than that of the currently running > process. > But, I don't know the signal be checked when > returning from kernel mode to user mode. > > Anyone have any other methods to checked the > signal in the other occasion ? > > Thanks, > > Wenyen I would suggest asking this question on the freebsd-hackers list. -Garrett