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/ia32/ia32_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 /*-
    2  * Copyright (c) 1999 Marcel Moolenaar
    3  * Copyright (c) 2003 Peter Wemm
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer 
   11  *    in this position and unchanged.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. The name of the author may not be used to endorse or promote products
   16  *    derived from this software without specific prior written permission.
   17  *
   18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   19  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   20  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   21  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   23  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   24  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   25  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   28  *
   29  * $FreeBSD: releng/5.2/sys/compat/ia32/ia32_signal.h 122303 2003-11-08 07:43:44Z peter $
   30  */
   31 
   32 struct ia32_sigaltstack {
   33         u_int32_t       ss_sp;          /* signal stack base */
   34         u_int32_t       ss_size;        /* signal stack length */
   35         int             ss_flags;       /* SS_DISABLE and/or SS_ONSTACK */
   36 };
   37 
   38 struct ia32_mcontext {
   39         int     mc_onstack;             /* XXX - sigcontext compat. */
   40         int     mc_gs;                  /* machine state (struct trapframe) */
   41         int     mc_fs;
   42         int     mc_es;
   43         int     mc_ds;
   44         int     mc_edi;
   45         int     mc_esi;
   46         int     mc_ebp;
   47         int     mc_isp;
   48         int     mc_ebx;
   49         int     mc_edx;
   50         int     mc_ecx;
   51         int     mc_eax;
   52         int     mc_trapno;
   53         int     mc_err;
   54         int     mc_eip;
   55         int     mc_cs;
   56         int     mc_eflags;
   57         int     mc_esp;
   58         int     mc_ss;
   59         int     mc_len;                 /* sizeof(struct ia32_mcontext) */
   60         /* We use the same values for fpformat and ownedfp */
   61         int     mc_fpformat;
   62         int     mc_ownedfp;
   63         int     mc_spare1[1];           /* align next field to 16 bytes */
   64         /*
   65          * See <i386/include/npx.h> for the internals of mc_fpstate[].
   66          */
   67         int     mc_fpstate[128] __aligned(16);
   68         int     mc_spare2[8];
   69 };
   70 
   71 struct ia32_ucontext {
   72         sigset_t                uc_sigmask;
   73         struct ia32_mcontext    uc_mcontext;
   74         u_int32_t               uc_link;
   75         struct ia32_sigaltstack uc_stack;
   76         int                     uc_flags;
   77         int                     __spare__[4];
   78 };
   79 
   80 
   81 #if defined(COMPAT_FREEBSD4)
   82 struct ia32_mcontext4 {
   83         int     mc_onstack;             /* XXX - sigcontext compat. */
   84         int     mc_gs;                  /* machine state (struct trapframe) */
   85         int     mc_fs;
   86         int     mc_es;
   87         int     mc_ds;
   88         int     mc_edi;
   89         int     mc_esi;
   90         int     mc_ebp;
   91         int     mc_isp;
   92         int     mc_ebx;
   93         int     mc_edx;
   94         int     mc_ecx;
   95         int     mc_eax;
   96         int     mc_trapno;
   97         int     mc_err;
   98         int     mc_eip;
   99         int     mc_cs;
  100         int     mc_eflags;
  101         int     mc_esp; 
  102         int     mc_ss;
  103         int     mc_fpregs[28];
  104         int     __spare__[17];
  105 };
  106 
  107 struct ia32_ucontext4 {
  108         sigset_t                uc_sigmask;
  109         struct ia32_mcontext4   uc_mcontext;
  110         u_int32_t               uc_link;
  111         struct ia32_sigaltstack uc_stack;
  112         int                     __spare__[8];
  113 };
  114 #endif
  115 
  116 /*
  117  * Signal frames, arguments passed to application signal handlers.
  118  */
  119 union ia32_sigval {
  120         int                     sigval_int;
  121         u_int32_t               sigval_ptr;
  122 };
  123 struct ia32_siginfo {
  124         int                     si_signo;       /* signal number */
  125         int                     si_errno;       /* errno association */
  126         int                     si_code;        /* signal code */
  127         int32_t                 si_pid;         /* sending process */
  128         u_int32_t               si_uid;         /* sender's ruid */
  129         int                     si_status;      /* exit value */
  130         u_int32_t               si_addr;        /* faulting instruction */
  131         union ia32_sigval       si_value;       /* signal value */
  132         int32_t                 si_band;        /* band event for SIGPOLL */
  133         int                     __spare__[7];   /* gimme some slack */
  134 };
  135 
  136 #ifdef COMPAT_FREEBSD4
  137 struct ia32_sigframe4 {
  138         u_int32_t               sf_signum;
  139         u_int32_t               sf_siginfo;     /* code or pointer to sf_si */
  140         u_int32_t               sf_ucontext;    /* points to sf_uc */
  141         u_int32_t               sf_addr;        /* undocumented 4th arg */
  142         u_int32_t               sf_ah;          /* action/handler pointer */
  143         struct ia32_ucontext4   sf_uc;          /* = *sf_ucontext */
  144         struct ia32_siginfo     sf_si;          /* = *sf_siginfo (SA_SIGINFO case) */
  145 };
  146 #endif
  147 
  148 struct ia32_sigframe {
  149         u_int32_t               sf_signum;
  150         u_int32_t               sf_siginfo;     /* code or pointer to sf_si */
  151         u_int32_t               sf_ucontext;    /* points to sf_uc */
  152         u_int32_t               sf_addr;        /* undocumented 4th arg */
  153         u_int32_t               sf_ah;          /* action/handler pointer */
  154         struct ia32_ucontext    sf_uc;          /* = *sf_ucontext */
  155         struct ia32_siginfo     sf_si;          /* = *sf_siginfo (SA_SIGINFO case) */
  156 };
  157 
  158 extern char ia32_sigcode[];
  159 extern char freebsd4_ia32_sigcode[];
  160 extern int sz_ia32_sigcode;
  161 extern int sz_freebsd4_ia32_sigcode;
  162 extern void ia32_sendsig(sig_t, int, sigset_t *, u_long);
  163 extern void ia32_setregs(struct thread *td, u_long entry, u_long stack,
  164     u_long ps_strings);

Cache object: f4608ab8d3a339f1d69e1f345a90abc6


[ 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.