From owner-freebsd-arch@FreeBSD.ORG Thu Oct 13 15:32:21 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3F5E16A421 for ; Thu, 13 Oct 2005 15:32:21 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B16D43D4C for ; Thu, 13 Oct 2005 15:32:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 13 Oct 2005 11:48:42 -0400 From: John Baldwin To: freebsd-arch@freebsd.org Date: Thu, 13 Oct 2005 10:31:50 -0400 User-Agent: KMail/1.8.2 References: <434DD327.7090200@126.com> In-Reply-To: <434DD327.7090200@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510131031.53753.jhb@freebsd.org> Cc: David Xu Subject: Re: POSIX siginfo X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 15:32:22 -0000 On Wednesday 12 October 2005 11:23 pm, David Xu wrote: > I am trying to implement POSIX sigqueue, while staring some code > in machdep.c and trap.c, I found our si_code for siginfo structure > is not in POSIX standard, all are machine dependent magical values > pushed by CPU. POSIX lists all these standard codes: > > http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html > > /* codes for SIGILL */ > ILL_ILLOPC > ILL_ILLOPN > ILL_ILLADR > ILL_ILLTRP > ILL_PRVOPC > ILL_PRVREG > ILL_COPROC > ILL_BADSTK > > /* codes for SIGBUS */ > BUS_ADRALN > BUS_ADRERR > BUS_OBJERR > BUS_RESERVED > > /* codes for SIGSEGV */ > SEGV_MAPERR > SEGV_ACCERR > > /* codes for SIGFPE */ > FPE_INTOVF 1 > FPE_INTDIV 2 > FPE_FLTDIV 3 > FPE_FLTOVF 4 > FPE_FLTUND 5 > FPE_FLTRES 6 > FPE_FLTINV 7 > FPE_FLTSUB 8 > > /* codes for SIGTRAP */ > TRAP_BRKPT > TRAP_TRACE > > ... > > Note that, NetBSD and Linux had already used the POSIX codes, should we > use them too? Hmm, looks like we do use these values in some cases on i386 at least for SIGFPE and possibly SIGBUS. I think you should fix all the archs to use these codes. I would even go ahead and commit that on its own before the POSIX sigqueue stuff. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org