From owner-freebsd-arch@FreeBSD.ORG Thu Oct 13 06:10:23 2005 Return-Path: X-Original-To: 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 DD50A16A41F for ; Thu, 13 Oct 2005 06:10:23 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3755443D48 for ; Thu, 13 Oct 2005 06:10:18 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.204] ([192.168.254.204]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j9D6A08u046986; Thu, 13 Oct 2005 00:10:01 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <434DFA35.6070902@samsco.org> Date: Thu, 13 Oct 2005 00:09:57 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <434DD327.7090200@126.com> In-Reply-To: <434DD327.7090200@126.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED, UPPERCASE_25_50 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: arch@freebsd.org 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 06:10:24 -0000 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? > > David Xu > I'm by no means an expert in this work, but one thing that I will say is that you should be careful and look at the previous attempts here in FreeBSD. I believe that Juli Mallett tried implementing signal queues a coupld of years ago but pulled them out because it turned out hard to make them reliable in low-memory situations. Scott