1178172Simp/* $OpenBSD: signal.h,v 1.2 1999/01/27 04:10:03 imp Exp $ */ 2178172Simp 3178172Simp/* 4178172Simp * Copyright (c) 1992, 1993 5178172Simp * The Regents of the University of California. All rights reserved. 6178172Simp * 7178172Simp * This code is derived from software contributed to Berkeley by 8178172Simp * Ralph Campbell. 9178172Simp * 10178172Simp * Redistribution and use in source and binary forms, with or without 11178172Simp * modification, are permitted provided that the following conditions 12178172Simp * are met: 13178172Simp * 1. Redistributions of source code must retain the above copyright 14178172Simp * notice, this list of conditions and the following disclaimer. 15178172Simp * 2. Redistributions in binary form must reproduce the above copyright 16178172Simp * notice, this list of conditions and the following disclaimer in the 17178172Simp * documentation and/or other materials provided with the distribution. 18178172Simp * 4. Neither the name of the University nor the names of its contributors 19178172Simp * may be used to endorse or promote products derived from this software 20178172Simp * without specific prior written permission. 21178172Simp * 22178172Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23178172Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24178172Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25178172Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26178172Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27178172Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28178172Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29178172Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30178172Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31178172Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32178172Simp * SUCH DAMAGE. 33178172Simp * 34178172Simp * @(#)signal.h 8.1 (Berkeley) 6/10/93 35178172Simp * JNPR: signal.h,v 1.4 2007/01/08 04:58:37 katta 36178172Simp * $FreeBSD$ 37178172Simp */ 38178172Simp 39178172Simp#ifndef _MACHINE_SIGNAL_H_ 40178172Simp#define _MACHINE_SIGNAL_H_ 41178172Simp 42178172Simp#include <sys/cdefs.h> 43178172Simp#include <sys/_sigset.h> 44178172Simp 45178172Simp/* 46178172Simp * Machine-dependent signal definitions 47178172Simp */ 48178172Simp 49178172Simptypedef int sig_atomic_t; 50178172Simp 51178172Simp#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 52178172Simp/* 53178172Simp * Information pushed on stack when a signal is delivered. 54178172Simp * This is used by the kernel to restore state following 55178172Simp * execution of the signal handler. It is also made available 56178172Simp * to the handler to allow it to restore state properly if 57178172Simp * a non-standard exit is performed. 58178172Simp */ 59178172Simp 60178172Simpstruct sigcontext { 61178172Simp /* 62178172Simp * The fields following 'sc_mask' must match the definition 63178172Simp * of struct __mcontext. That way we can support 64178172Simp * struct sigcontext and ucontext_t at the same 65178172Simp * time. 66178172Simp */ 67178172Simp __sigset_t sc_mask; /* signal mask to restore */ 68178172Simp int sc_onstack; /* sigstack state to restore */ 69178172Simp __register_t sc_pc; /* pc at time of signal */ 70178172Simp __register_t sc_regs[32]; /* processor regs 0 to 31 */ 71178172Simp __register_t mullo, mulhi; /* mullo and mulhi registers... */ 72178172Simp int sc_fpused; /* fp has been used */ 73178172Simp f_register_t sc_fpregs[33]; /* fp regs 0 to 31 and csr */ 74178172Simp __register_t sc_fpc_eir; /* fp exception instruction reg */ 75178172Simp int xxx[8]; /* XXX reserved */ 76178172Simp}; 77178172Simp 78178172Simp#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ 79178172Simp 80178172Simp#endif /* !_MACHINE_SIGNAL_H_ */ 81