POSIX siginfo

From: David Xu (bsddiy_at_126.com)
Date: 10/13/05

  • Next message: Scott Long: "Re: POSIX siginfo"
    Date: Thu, 13 Oct 2005 11:23:19 +0800
    To: arch@freebsd.org
    
    

    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

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Scott Long: "Re: POSIX siginfo"

    Relevant Pages

    • Re: on buffer overflows and insecurity
      ... reasons POSIX doesn't enumerate? ... implementation should define additional error codes properly. ... is specify that there are codes for the commonest errors. ...
      (comp.lang.c)
    • Re: on buffer overflows and insecurity
      ... reasons POSIX doesn't enumerate? ... The obvious thing to do is have a general error code in addition to ... implementation should define additional error codes properly. ... What it can do is specify that there are codes for the ...
      (comp.lang.c)
    • Re: POSIX siginfo
      ... David Xu wrote: ... > is not in POSIX standard, all are machine dependent magical values ... POSIX lists all these standard codes: ...
      (freebsd-arch)
    • Re: POSIX siginfo
      ... >> I am trying to implement POSIX sigqueue, ... >> is not in POSIX standard, all are machine dependent magical values ... >> Note that, NetBSD and Linux had already used the POSIX codes, should we ...
      (freebsd-arch)
    • Re: POSIX siginfo
      ... > is not in POSIX standard, all are machine dependent magical values ... POSIX lists all these standard codes: ... POSIX sigqueue stuff. ...
      (freebsd-arch)