From owner-freebsd-questions@FreeBSD.ORG Sat Nov 11 18:55:31 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 7AEEF16A40F for ; Sat, 11 Nov 2006 18:55:31 +0000 (UTC) (envelope-from trowa-4@yahoo.com.tw) Received: from web72013.mail.tp2.yahoo.com (web72013.mail.tp2.yahoo.com [203.188.200.43]) by mx1.FreeBSD.org (Postfix) with SMTP id A6A9243D45 for ; Sat, 11 Nov 2006 18:55:30 +0000 (GMT) (envelope-from trowa-4@yahoo.com.tw) Received: (qmail 17558 invoked by uid 60001); 11 Nov 2006 18:55:29 -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=FfcR+Gj+3UJIW3Ud57h8FcRAGZn7by33omgnHb2RYzHmHpRUye7uMcrxpQQhQre8GtV9OhxhkqP0vtZw0FuxUQ9YMzvxhgDK54JHWQw3tOsKPtKzBZvvEpFgnwhFxpCQNTN7b0ZbBYCVp/pFsty6+UdhQp4y7fMOtUcydzyiMcM=; X-YMail-OSG: lGzO86QVM1kOmMg1Khka.ke1M8dm8vTAch7.2IOr0LtDJbX6p.ZfSCfHsYdUxo2BbvcWJ_PNmXi7CnP5xXhjy2WidaiIpykwGSSz_yHJwYGmjPJ2eqUsSN1U1iGzDK.CqrBleLFF8wFm81v4rNMGkZmMteBvMFnrv4attg9j4DCRa1NRHbGrPYO7qxNk Received: from [61.56.138.188] by web72013.mail.tp2.yahoo.com via HTTP; Sun, 12 Nov 2006 02:55:29 CST Date: Sun, 12 Nov 2006 02:55:29 +0800 (CST) From: "Wenyen, Shih" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit Message-ID: <562718.15358.qm@web72013.mail.tp2.yahoo.com> X-Mailman-Approved-At: Sun, 12 Nov 2006 05:18:31 +0000 Subject: 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: Sat, 11 Nov 2006 18:55:31 -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 any other methods to checked the signal in the other occasion ? Thanks, Wenyen ___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! http://messenger.yahoo.com.tw/