From owner-freebsd-arch@FreeBSD.ORG Thu Oct 13 03:23:31 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 EFC9E16A41F for ; Thu, 13 Oct 2005 03:23:31 +0000 (GMT) (envelope-from bsddiy@126.com) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C526443D46 for ; Thu, 13 Oct 2005 03:23:31 +0000 (GMT) (envelope-from bsddiy@126.com) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9D3NOfs006045 for ; Thu, 13 Oct 2005 03:23:25 GMT (envelope-from bsddiy@126.com) Message-ID: <434DD327.7090200@126.com> Date: Thu, 13 Oct 2005 11:23:19 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20050928 X-Accept-Language: en-us, en MIME-Version: 1.0 To: arch@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: 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 03:23:32 -0000 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