signal.h revision 1.5
11.5Smycroft/*	$NetBSD: signal.h,v 1.5 1995/05/01 14:14:11 mycroft Exp $	*/
21.3Scgd
31.1Sbrezak/*
41.1Sbrezak * Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
51.1Sbrezak * All rights reserved.
61.1Sbrezak *
71.1Sbrezak * Redistribution and use in source and binary forms, with or without
81.1Sbrezak * modification, are permitted provided that the following conditions
91.1Sbrezak * are met:
101.1Sbrezak * 1. Redistributions of source code must retain the above copyright
111.1Sbrezak *    notice, this list of conditions and the following disclaimer.
121.1Sbrezak * 2. Redistributions in binary form must reproduce the above copyright
131.1Sbrezak *    notice, this list of conditions and the following disclaimer in the
141.1Sbrezak *    documentation and/or other materials provided with the distribution.
151.1Sbrezak * 3. All advertising materials mentioning features or use of this software
161.1Sbrezak *    must display the following acknowledgement:
171.1Sbrezak *	This product includes software developed by the University of
181.1Sbrezak *	California, Berkeley and its contributors.
191.1Sbrezak * 4. Neither the name of the University nor the names of its contributors
201.1Sbrezak *    may be used to endorse or promote products derived from this software
211.1Sbrezak *    without specific prior written permission.
221.1Sbrezak *
231.1Sbrezak * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.1Sbrezak * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.1Sbrezak * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.1Sbrezak * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.1Sbrezak * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.1Sbrezak * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.1Sbrezak * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.1Sbrezak * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.1Sbrezak * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Sbrezak * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Sbrezak * SUCH DAMAGE.
341.1Sbrezak *
351.3Scgd *	@(#)signal.h	7.16 (Berkeley) 3/17/91
361.1Sbrezak */
371.1Sbrezak
381.2Smycroft#ifndef _I386_SIGNAL_H_
391.2Smycroft#define _I386_SIGNAL_H_
401.1Sbrezak
411.1Sbrezaktypedef int sig_atomic_t;
421.1Sbrezak
431.4Sjtc#ifndef _ANSI_SOURCE
441.1Sbrezak/*
451.1Sbrezak * Get the "code" values
461.1Sbrezak */
471.1Sbrezak#include <machine/trap.h>
481.1Sbrezak
491.1Sbrezak/*
501.1Sbrezak * Information pushed on stack when a signal is delivered.
511.1Sbrezak * This is used by the kernel to restore state following
521.1Sbrezak * execution of the signal handler.  It is also made available
531.1Sbrezak * to the handler to allow it to restore state properly if
541.1Sbrezak * a non-standard exit is performed.
551.1Sbrezak */
561.1Sbrezakstruct	sigcontext {
571.5Smycroft	int	sc_gs;
581.5Smycroft	int	sc_fs;
591.2Smycroft	int	sc_es;
601.2Smycroft	int	sc_ds;
611.2Smycroft	int	sc_edi;
621.2Smycroft	int	sc_esi;
631.2Smycroft	int	sc_ebp;
641.2Smycroft	int	sc_ebx;
651.2Smycroft	int	sc_edx;
661.2Smycroft	int	sc_ecx;
671.2Smycroft	int	sc_eax;
681.2Smycroft	int	sc_eip;
691.2Smycroft	int	sc_cs;
701.2Smycroft	int	sc_eflags;
711.2Smycroft	int	sc_esp;
721.2Smycroft	int	sc_ss;
731.5Smycroft
741.5Smycroft	int	sc_onstack;		/* sigstack state to restore */
751.5Smycroft	int	sc_mask;		/* signal mask to restore */
761.1Sbrezak};
771.1Sbrezak
781.1Sbrezak#define sc_sp sc_esp
791.1Sbrezak#define sc_fp sc_ebp
801.1Sbrezak#define sc_pc sc_eip
811.2Smycroft#define sc_ps sc_eflags
821.1Sbrezak
831.4Sjtc#endif	/* !_ANSI_SOURCE */
841.4Sjtc#endif	/* !_I386_SIGNAL_H_ */
85