From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 12 07:29:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C5D416A407 for ; Sun, 12 Nov 2006 07:29:19 +0000 (UTC) (envelope-from trowa-4@yahoo.com.tw) Received: from web72002.mail.tp2.yahoo.com (web72002.mail.tp2.yahoo.com [203.188.200.32]) by mx1.FreeBSD.org (Postfix) with SMTP id 00C3643D46 for ; Sun, 12 Nov 2006 07:29:17 +0000 (GMT) (envelope-from trowa-4@yahoo.com.tw) Received: (qmail 48986 invoked by uid 60001); 12 Nov 2006 07:29:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.tw; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=ykgvaca8VtxoUe623LXW1ftgFSYi+75zYE4CBEzpXY0zXUJiaFpStGCtLqsj1qCjNWvr+3A/Sd+SqiIMJv/jbcTvFYcgbSdeo403KOXHC10R7R/TfNKARmUI7vWh5qXLEN0H4t0MV1y1i36BN6612JNM9UBwa+sPl1vgJ1H/ros=; X-YMail-OSG: wsW4JucVM1m1D7a82V_ma5xNE8lldgNdoWJc893hp94B5rgsk.7tGNo4OzZQg0qzKgBm8Cgko6yYnaaLj9E810TbpFX0dFNfBppZpK5shGL7a_7Vu5HmV6xIMECHz_FdqZi6rojAVfJTekUysRa6y.cAgqfnXXHcY9mwswo_N9K4DnqpeVW_F7mKYfzh Received: from [61.56.138.188] by web72002.mail.tp2.yahoo.com via HTTP; Sun, 12 Nov 2006 15:29:16 CST Date: Sun, 12 Nov 2006 15:29:16 +0800 (CST) From: "Wenyen, Shih" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit Message-ID: <546973.48245.qm@web72002.mail.tp2.yahoo.com> X-Mailman-Approved-At: Sun, 12 Nov 2006 12:39:04 +0000 Subject: signal design questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:29:19 -0000 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 other methods to checked the signal in the other occasion ? Thanks, Wenyen ___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! http://messenger.yahoo.com.tw/