The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/compat/irix/irix_signal.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: irix_signal.h,v 1.18 2008/04/28 20:23:42 martin Exp $ */
    2 
    3 /*-
    4  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
    5  * All rights reserved.
    6  *
    7  * This code is derived from software contributed to The NetBSD Foundation
    8  * by Emmanuel Dreyfus.
    9  *
   10  * Redistribution and use in source and binary forms, with or without
   11  * modification, are permitted provided that the following conditions
   12  * are met:
   13  * 1. Redistributions of source code must retain the above copyright
   14  *    notice, this list of conditions and the following disclaimer.
   15  * 2. Redistributions in binary form must reproduce the above copyright
   16  *    notice, this list of conditions and the following disclaimer in the
   17  *    documentation and/or other materials provided with the distribution.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   29  * POSSIBILITY OF SUCH DAMAGE.
   30  */
   31 
   32 #ifndef _IRIX_SIGNAL_H_
   33 #define _IRIX_SIGNAL_H_
   34 
   35 #include <sys/types.h>
   36 #include <sys/signal.h>
   37 
   38 #include <machine/svr4_machdep.h>
   39 
   40 #include <compat/irix/irix_types.h>
   41 
   42 /* From IRIX's <sys/signal.h> */
   43 
   44 #define IRIX_SIG_SETMASK32 256
   45 
   46 typedef struct irix_sigcontext {
   47         __uint32_t      isc_regmask;
   48         __uint32_t      isc_status;
   49         __uint64_t      isc_pc;
   50         __uint64_t      isc_regs[32];
   51         __uint64_t      isc_fpregs[32];
   52         __uint32_t      isc_ownedfp;
   53         __uint32_t      isc_fpc_csr;
   54         __uint32_t      isc_fpc_eir;
   55         __uint32_t      isc_ssflags;
   56         __uint64_t      isc_mdhi;
   57         __uint64_t      isc_mdlo;
   58         __uint64_t      isc_cause;
   59         __uint64_t      isc_badvaddr;
   60         __uint64_t      isc_triggersave;
   61         irix_sigset_t   isc_sigset;
   62         __uint64_t      isc_fp_rounded_result;
   63         __uint64_t      isc_pad[31];
   64 } irix_sigcontext_t;
   65 
   66 #define IRIX_SS_ONSTACK 0x00000001
   67 #define IRIX_SS_DISABLE 0x00000002
   68 
   69 /* From IRIX's <sys/ucontext.h> */
   70 #define IRIX_UC_SIGMASK 001
   71 #define IRIX_UC_STACK   002
   72 #define IRIX_UC_CPU     004
   73 #define IRIX_UC_MAU     010
   74 #define IRIX_UC_MCONTEXT (IRIX_UC_CPU|IRIX_UC_MAU)
   75 #define IRIX_UC_ALL     (IRIX_UC_SIGMASK|IRIX_UC_STACK|IRIX_UC_MCONTEXT)
   76 
   77 #define IRIX_CTX_MDLO   32
   78 #define IRIX_CTX_MDHI   33
   79 #define IRIX_CTX_CAUSE  34
   80 #define IRIX_CTX_EPC    35
   81 
   82 #if 1 /* _MIPS_SZLONG == 32 */
   83 typedef struct irix__sigaltstack {
   84         void            *ss_sp;
   85         irix_size_t     ss_size;
   86         int             ss_flags;
   87 } irix_stack_t;
   88 #endif
   89 #if 0 /* _MIPS_SZLONG == 64 */
   90 typedef struct irix__sigaltstack {
   91         void            *ss_sp;
   92         __uint32_t      ss_size;
   93         int             ss_flags;
   94 } irix_stack_t;
   95 #endif
   96 
   97 typedef struct irix_ucontext {
   98         unsigned long           iuc_flags;
   99         struct irix_ucontext    *iuc_link;
  100         irix_sigset_t           iuc_sigmask;
  101         irix_stack_t            iuc_stack;
  102         svr4_mcontext_t         iuc_mcontext;
  103         long                    iuc_filler[47];
  104         int                     iuc_triggersave;
  105 } irix_ucontext_t;
  106 
  107 /* From IRIX's <sys/siginfo.h> */
  108 #define IRIX_ILL_ILLOPC 1
  109 #define IRIX_ILL_ILLOPN 2
  110 #define IRIX_ILL_ILLADR 3
  111 #define IRIX_ILL_ILLTRP 4
  112 #define IRIX_ILL_PRVOPC 5
  113 #define IRIX_ILL_PRVREG 6
  114 #define IRIX_ILL_COPROC 7
  115 #define IRIX_ILL_BADSTK 8
  116 
  117 #define IRIX_FPE_INTDIV 1
  118 #define IRIX_FPE_INTOVF 2
  119 #define IRIX_FPE_FLTDIV 3
  120 #define IRIX_FPE_FLTOVF 4
  121 #define IRIX_FPE_FLTUND 5
  122 #define IRIX_FPE_FLTRES 6
  123 #define IRIX_FPE_FLTINV 7
  124 #define IRIX_FPE_FLTSUB 8
  125 
  126 #define IRIX_SEGV_MAPERR        1
  127 #define IRIX_SEGV_ACCERR        2
  128 
  129 #define IRIX_BUS_ADRALN 1
  130 #define IRIX_BUS_ADRERR 2
  131 #define IRIX_BUS_OBJERR 3
  132 
  133 #define IRIX_TRAP_BRKPT 1
  134 #define IRIX_TRAP_TRACE 2
  135 
  136 #define IRIX_CLD_EXITED 1
  137 #define IRIX_CLD_KILLED 2
  138 #define IRIX_CLD_DUMPED 3
  139 #define IRIX_CLD_TRAPPED        4
  140 #define IRIX_CLD_STOPPED        5
  141 #define IRIX_CLD_CONTINUED      6
  142 
  143 #define IRIX_POLL_IN    1
  144 #define IRIX_POLL_OUT   2
  145 #define IRIX_POLL_MSG   3
  146 #define IRIX_POLL_ERR   4
  147 #define IRIX_POLL_PRI   5
  148 #define IRIX_POLL_HUP   6
  149 
  150 #define IRIX_UME_ECCERR 1
  151 
  152 /* From IRIX's <sys/fault.h> */
  153 #define IRIX_FLTILL     1
  154 #define IRIX_FLTPRIV    2
  155 #define IRIX_FLTBPT     3
  156 #define IRIX_FLTTRACE   4
  157 #define IRIX_FLTACCESS  5
  158 #define IRIX_FLTBOUNDS  6
  159 #define IRIX_FLTIOVF    7
  160 #define IRIX_FLTIZDIV   8
  161 #define IRIX_FLTFPE     9
  162 #define IRIX_FLTSTACK   10
  163 #define IRIX_FLTPAGE    11
  164 #define IRIX_FLTPCINVAL 12
  165 #define IRIX_FLTWATCH   13
  166 #define IRIX_FLTKWATCH  14
  167 #define IRIX_FLTSCWATCH 15
  168 
  169 
  170 #define IRIX_SI_MAXSZ   128
  171 #define IRIX_SI_PAD     ((IRIX_SI_MAXSZ / sizeof(__int32_t)) - 3)
  172 
  173 /* From IRIX's <sys/ksignal.h> */
  174 typedef union irix_irix5_sigval {
  175         irix_app32_int_t        sigbval_int;
  176         irix_app32_ptr_t        sival_ptr;
  177 } irix_irix5_sigval_t;
  178 
  179 typedef struct irix_irix5_siginfo {
  180         irix_app32_int_t        isi_signo;
  181         irix_app32_int_t        isi_code;
  182         irix_app32_int_t        isi_errno;
  183         union {
  184                 irix_app32_int_t        si_pad[IRIX_SI_PAD];
  185                 struct {
  186                         irix_irix5_pid_t        __pid;
  187                         union {
  188                                 struct {
  189                                         irix_irix5_uid_t        __uid;
  190                                 } __kill;
  191                                 struct {
  192                                         irix_irix5_clock_t      __utime;
  193                                         irix_app32_int_t        __status;
  194                                         irix_irix5_clock_t      __stime;
  195                                         irix_app32_int_t        __swap;
  196                                 } __cld;
  197                         } __pdata;
  198                 } __proc;
  199                 struct {
  200                         irix_app32_ptr_t        __addr;
  201                 } __fault;
  202                 struct {
  203                         irix_app32_int_t        __fd;
  204                         irix_app32_long_t       __band;
  205                 } __file;
  206                 union irix_irix5_sigval __value;
  207         } __data;
  208 } irix_irix5_siginfo_t;
  209 
  210 #define isi_pid         __data.__proc.__pid
  211 #define isi_stime       __data.__proc.__pdata.__cld.__stime
  212 #define isi_utime       __data.__proc.__pdata.__cld.__utime
  213 #define isi_status      __data.__proc.__pdata.__cld.__status
  214 #define isi_addr        __data.__fault.__addr
  215 #define isi_trap
  216 
  217 /*
  218  * This is the signal frame, as seen by the signal handler. The
  219  * kernel only sets up isf_ctx, the signal trampoline does the
  220  * other fields.
  221  */
  222 struct irix_sigframe {
  223         int isf_pad1[7];
  224         int *isf_uep;   /* Pointer to errno in userspace */
  225         int isf_errno;
  226         int isf_signo;
  227         struct irix_sigcontext *isf_scp;
  228         struct irix_ucontext *isf_ucp;
  229         union {
  230                 struct irix_sigcontext isc;
  231                 struct irix_sigcontext_siginfo {
  232                         struct irix_ucontext    iuc;
  233                         struct irix_irix5_siginfo       iis;
  234                 } iss;
  235         } isf_ctx;
  236 };
  237 
  238 
  239 #ifdef _KERNEL
  240 __BEGIN_DECLS
  241 void native_to_irix_sigset(const sigset_t *, irix_sigset_t *);
  242 void irix_to_native_sigset(const irix_sigset_t *, sigset_t *);
  243 
  244 
  245 void irix_sendsig(const ksiginfo_t *, const sigset_t *);
  246 __END_DECLS
  247 #endif /* _KERNEL */
  248 
  249 
  250 #endif /* _IRIX_SIGNAL_H_ */

Cache object: dca9c6bf50dccac1a6146951e6893de5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.