signal.h revision 1.1
11.1Sbrezak/* 21.1Sbrezak * Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California. 31.1Sbrezak * All rights reserved. 41.1Sbrezak * 51.1Sbrezak * Redistribution and use in source and binary forms, with or without 61.1Sbrezak * modification, are permitted provided that the following conditions 71.1Sbrezak * are met: 81.1Sbrezak * 1. Redistributions of source code must retain the above copyright 91.1Sbrezak * notice, this list of conditions and the following disclaimer. 101.1Sbrezak * 2. Redistributions in binary form must reproduce the above copyright 111.1Sbrezak * notice, this list of conditions and the following disclaimer in the 121.1Sbrezak * documentation and/or other materials provided with the distribution. 131.1Sbrezak * 3. All advertising materials mentioning features or use of this software 141.1Sbrezak * must display the following acknowledgement: 151.1Sbrezak * This product includes software developed by the University of 161.1Sbrezak * California, Berkeley and its contributors. 171.1Sbrezak * 4. Neither the name of the University nor the names of its contributors 181.1Sbrezak * may be used to endorse or promote products derived from this software 191.1Sbrezak * without specific prior written permission. 201.1Sbrezak * 211.1Sbrezak * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221.1Sbrezak * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231.1Sbrezak * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241.1Sbrezak * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251.1Sbrezak * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261.1Sbrezak * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271.1Sbrezak * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281.1Sbrezak * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291.1Sbrezak * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301.1Sbrezak * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311.1Sbrezak * SUCH DAMAGE. 321.1Sbrezak * 331.1Sbrezak * from: @(#)signal.h 7.16 (Berkeley) 3/17/91 341.1Sbrezak * $Id: signal.h,v 1.1 1993/09/19 18:57:48 brezak Exp $ 351.1Sbrezak */ 361.1Sbrezak 371.1Sbrezak#ifndef _MACHINE_SIGNAL_H_ 381.1Sbrezak#define _MACHINE_SIGNAL_H_ 391.1Sbrezak 401.1Sbrezaktypedef int sig_atomic_t; 411.1Sbrezak 421.1Sbrezak/* 431.1Sbrezak * Get the "code" values 441.1Sbrezak */ 451.1Sbrezak#include <machine/trap.h> 461.1Sbrezak 471.1Sbrezak/* 481.1Sbrezak * Information pushed on stack when a signal is delivered. 491.1Sbrezak * This is used by the kernel to restore state following 501.1Sbrezak * execution of the signal handler. It is also made available 511.1Sbrezak * to the handler to allow it to restore state properly if 521.1Sbrezak * a non-standard exit is performed. 531.1Sbrezak */ 541.1Sbrezakstruct sigcontext { 551.1Sbrezak int sc_onstack; /* sigstack state to restore */ 561.1Sbrezak int sc_mask; /* signal mask to restore */ 571.1Sbrezak int sc_esp; /* machine state */ 581.1Sbrezak int sc_ebp; 591.1Sbrezak int sc_isp; 601.1Sbrezak int sc_eip; 611.1Sbrezak int sc_efl; 621.1Sbrezak int sc_es; 631.1Sbrezak int sc_ds; 641.1Sbrezak int sc_cs; 651.1Sbrezak int sc_ss; 661.1Sbrezak int sc_edi; 671.1Sbrezak int sc_esi; 681.1Sbrezak int sc_ebx; 691.1Sbrezak int sc_edx; 701.1Sbrezak int sc_ecx; 711.1Sbrezak int sc_eax; 721.1Sbrezak}; 731.1Sbrezak 741.1Sbrezak#define sc_sp sc_esp 751.1Sbrezak#define sc_fp sc_ebp 761.1Sbrezak#define sc_pc sc_eip 771.1Sbrezak#define sc_ps sc_efl 781.1Sbrezak 791.1Sbrezak#endif /* _MACHINE_SIGNAL_H_ */ 80