signal.h revision 27993
1139749Simp/* 284059Swpaul * Copyright (c) 1986, 1989, 1991, 1993 384059Swpaul * The Regents of the University of California. All rights reserved. 484059Swpaul * 584059Swpaul * Redistribution and use in source and binary forms, with or without 684059Swpaul * modification, are permitted provided that the following conditions 784059Swpaul * are met: 884059Swpaul * 1. Redistributions of source code must retain the above copyright 984059Swpaul * notice, this list of conditions and the following disclaimer. 1084059Swpaul * 2. Redistributions in binary form must reproduce the above copyright 1184059Swpaul * notice, this list of conditions and the following disclaimer in the 1284059Swpaul * documentation and/or other materials provided with the distribution. 1384059Swpaul * 3. All advertising materials mentioning features or use of this software 1484059Swpaul * must display the following acknowledgement: 1584059Swpaul * This product includes software developed by the University of 1684059Swpaul * California, Berkeley and its contributors. 1784059Swpaul * 4. Neither the name of the University nor the names of its contributors 1884059Swpaul * may be used to endorse or promote products derived from this software 1984059Swpaul * without specific prior written permission. 2084059Swpaul * 2184059Swpaul * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2284059Swpaul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2384059Swpaul * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2484059Swpaul * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2584059Swpaul * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2684059Swpaul * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2784059Swpaul * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2884059Swpaul * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2984059Swpaul * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3084059Swpaul * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3184059Swpaul * SUCH DAMAGE. 3284059Swpaul * 3384059Swpaul * @(#)signal.h 8.1 (Berkeley) 6/11/93 34119418Sobrien * $Id: signal.h,v 1.7 1997/02/22 09:35:12 peter Exp $ 35119418Sobrien */ 36119418Sobrien 3784059Swpaul#ifndef _MACHINE_SIGNAL_H_ 38251068Smarius#define _MACHINE_SIGNAL_H_ 39113038Sobrien 4084059Swpaul/* 41251068Smarius * Machine-dependent signal definitions 42221344Smarius */ 4384059Swpaul 4484059Swpaultypedef int sig_atomic_t; 4584059Swpaul 4684059Swpaul#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 4784059Swpaul 4884059Swpaul#include <machine/trap.h> /* codes for SIGILL, SIGFPE */ 4984059Swpaul 5084059Swpaul/* 5184059Swpaul * Information pushed on stack when a signal is delivered. 5284059Swpaul * This is used by the kernel to restore state following 5384059Swpaul * execution of the signal handler. It is also made available 54137073Sdes * to the handler to allow it to restore state properly if 5584059Swpaul * a non-standard exit is performed. 5692934Swpaul */ 5784059Swpaulstruct sigcontext { 5884059Swpaul int sc_onstack; /* sigstack state to restore */ 5984059Swpaul int sc_mask; /* signal mask to restore */ 6084059Swpaul int sc_esp; /* machine state */ 6184059Swpaul int sc_ebp; 6284059Swpaul int sc_isp; 6384059Swpaul int sc_eip; 6484059Swpaul int sc_efl; 6584059Swpaul int sc_es; 6684059Swpaul int sc_ds; 6784059Swpaul int sc_cs; 6884059Swpaul int sc_ss; 69151553Sglebius int sc_edi; 70151553Sglebius int sc_esi; 71151553Sglebius int sc_ebx; 72151553Sglebius int sc_edx; 7384059Swpaul int sc_ecx; 74118026Swpaul int sc_eax; 7584059Swpaul int sc_gs; 7684059Swpaul int sc_fs; 7784059Swpaul# define sc_sp sc_esp 7884059Swpaul# define sc_fp sc_ebp 7984059Swpaul# define sc_pc sc_eip 80129879Sphk# define sc_ps sc_efl 8184059Swpaul# define sc_eflags sc_efl 82162583Sscottl int sc_trapno; 83199668Syongari int sc_err; 8484059Swpaul}; 8584059Swpaul 8684059Swpaul#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ 8784059Swpaul 8884059Swpaul#endif /* !_MACHINE_SIGNAL_H_ */ 8984059Swpaul