Date: Thu, 13 Oct 2005 00:09:57 -0600 From: Scott Long <scottl@samsco.org> To: David Xu <bsddiy@126.com> Cc: arch@freebsd.org Subject: Re: POSIX siginfo Message-ID: <434DFA35.6070902@samsco.org> In-Reply-To: <434DD327.7090200@126.com> References: <434DD327.7090200@126.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?434DFA35.6070902>