sigframe.h revision 51792
151792Smarcel/*- 251792Smarcel * Copyright (c) 1999 Marcel Moolenaar 351792Smarcel * All rights reserved. 451792Smarcel * 551792Smarcel * Redistribution and use in source and binary forms, with or without 651792Smarcel * modification, are permitted provided that the following conditions 751792Smarcel * are met: 851792Smarcel * 1. Redistributions of source code must retain the above copyright 951792Smarcel * notice, this list of conditions and the following disclaimer 1051792Smarcel * in this position and unchanged. 1151792Smarcel * 2. Redistributions in binary form must reproduce the above copyright 1251792Smarcel * notice, this list of conditions and the following disclaimer in the 1351792Smarcel * documentation and/or other materials provided with the distribution. 1451792Smarcel * 3. The name of the author may not be used to endorse or promote products 1551792Smarcel * derived from this software without specific prior written permission. 1651792Smarcel * 1751792Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1851792Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1951792Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2051792Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2151792Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2251792Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2351792Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2451792Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2551792Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2651792Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2751792Smarcel * 2851792Smarcel * $FreeBSD: head/sys/i386/include/sigframe.h 51792 1999-09-29 15:06:27Z marcel $ 2951792Smarcel */ 3051792Smarcel 3151792Smarcel#ifndef _MACHINE_SIGFRAME_H_ 3251792Smarcel#define _MACHINE_SIGFRAME_H_ 1 3351792Smarcel 3451792Smarcelstruct osigframe { 3551792Smarcel /* 3651792Smarcel * The first three members may be used by applications. 3751792Smarcel */ 3851792Smarcel 3951792Smarcel register_t sf_signum; 4051792Smarcel 4151792Smarcel /* 4251792Smarcel * Either 'int' for old-style FreeBSD handler or 'siginfo_t *' 4351792Smarcel * pointing to sf_siginfo for SA_SIGINFO handlers. 4451792Smarcel */ 4551792Smarcel register_t sf_arg2; 4651792Smarcel 4751792Smarcel /* Points to sf_siginfo.si_sc. */ 4851792Smarcel register_t sf_scp; 4951792Smarcel 5051792Smarcel /* 5151792Smarcel * The following arguments are not constrained by the 5251792Smarcel * function call protocol. 5351792Smarcel * Applications are not supposed to access these members, 5451792Smarcel * except using the pointers we provide in the first three 5551792Smarcel * arguments. 5651792Smarcel */ 5751792Smarcel 5851792Smarcel char *sf_addr; 5951792Smarcel 6051792Smarcel union { 6151792Smarcel __osiginfohandler_t *sf_action; 6251792Smarcel __sighandler_t *sf_handler; 6351792Smarcel } sf_ahu; 6451792Smarcel 6551792Smarcel /* In the SA_SIGINFO case, sf_arg2 points here. */ 6651792Smarcel osiginfo_t sf_siginfo; 6751792Smarcel}; 6851792Smarcel 6951792Smarcelstruct sigframe { 7051792Smarcel /* 7151792Smarcel * The first three members may be used by applications. 7251792Smarcel */ 7351792Smarcel register_t sf_signum; 7451792Smarcel register_t sf_siginfo; /* code or pointer to sf_si */ 7551792Smarcel register_t sf_ucontext; /* points to sf_uc */ 7651792Smarcel register_t __spare__; /* Align sf_ahu */ 7751792Smarcel union { 7851792Smarcel __siginfohandler_t *sf_action; 7951792Smarcel __sighandler_t *sf_handler; 8051792Smarcel } sf_ahu; 8151792Smarcel register_t sf_sigreturn; /* sigreturn to use */ 8251792Smarcel siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ 8351792Smarcel ucontext_t sf_uc; /* = *sf_ucontext */ 8451792Smarcel}; 8551792Smarcel 8651792Smarcel#endif /* _MACHINE_SIGFRAME_H_ */ 87