/*-
* Copyright (c) 1982, 1986, 1989, 1991, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)signal.h 8.4 (Berkeley) 5/4/95
* $FreeBSD$
*/
#ifndef _SYS_SIGNAL_H_
#define _SYS_SIGNAL_H_
/*
* System defined signals.
*/
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#if __XSI_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#endif
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
#if __XSI_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */
/*
* Type of a signal handling function.
*
* Language spec sez signal handlers take exactly one arg, even though we
* actually supply three. Ugh!
*
* We don't try to hide the difference by leaving out the args because
* that would cause warnings about conformant programs. Nonconformant
* programs can avoid the warnings by casting to (__sighandler_t *) or
* sig_t before calling signal() or assigning to sa_handler or sv_handler.
*
* The kernel should reverse the cast before calling the function. It
* has no way to do this, but on most machines 1-arg and 3-arg functions
* have the same calling protocol so there is no problem in practice.
* A bit in sa_flags could be used to specify the number of args.
*/
typedef void __sighandler_t(int);
#if __POSIX_VISIBLE || __XSI_VISIBLE
#ifndef _SIGSET_T_DECLARED
#define _SIGSET_T_DECLARED
#endif
#endif
union sigval {
/* Members as suggested by Annex C of POSIX 1003.1b. */
int sival_int;
void *sival_ptr;
/* 6.0 compatibility */
int sigval_int;
void *sigval_ptr;
};
#endif
#if __POSIX_VISIBLE >= 199309
struct sigevent {
union {
struct {
unsigned short _kevent_flags;
} _sigev_un;
};
#if __BSD_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
#endif /* __POSIX_VISIBLE >= 199309 */
typedef struct __siginfo {
/*
* Cause of signal, one of the SI_ macros or signal-specific
* values, i.e. one of the FPE_... values for SIGFPE. This
* value is equivalent to the second argument to an old-style
* FreeBSD signal handler.
*/
union {
struct {
} _fault;
struct {
int _timerid;
int _overrun;
} _timer;
struct {
int _mqd;
} _mesgq;
struct {
struct {
long __spare1__;
} __spare__;
} _reason;
} siginfo_t;
/** si_code **/
/* codes for SIGILL */
/* codes for SIGBUS */
/* codes for SIGSEGV */
/* object. */
/* codes for SIGFPE */
/* codes for SIGTRAP */
/* codes for SIGCHLD */
/* did not create a core file */
/* created a core file */
/* codes for SIGPOLL */
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
struct __siginfo;
/*
* Signal vector "template" used in sigaction call.
*/
struct sigaction {
union {
void (*__sa_handler)(int);
};
#endif
#if __XSI_VISIBLE
/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */
#if __XSI_VISIBLE
#endif
#if __BSD_VISIBLE
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
/* a timer set by timer_settime(). */
/* an asynchronous I/O request.*/
/* message on an empty message queue. */
#endif
#if __BSD_VISIBLE
#define SI_UNDEFINED 0
#endif
#if __BSD_VISIBLE
#endif
#if __XSI_VISIBLE
/*
* Structure used in sigaltstack call.
*/
#if __BSD_VISIBLE
typedef struct sigaltstack {
#else
typedef struct {
#endif
} stack_t;
#endif
#if __BSD_VISIBLE
/*
* 4.3 compatibility:
* Signal vector "template" used in sigvec call.
*/
struct sigvec {
};
#endif
/* Keep this in one place only */
!defined(__i386__)
struct osigcontext {
int _not_used;
};
#endif
#if __XSI_VISIBLE
/*
* Structure used in sigstack call.
*/
struct sigstack {
};
#endif
/*
* Macro for converting signal number to a mask suitable for
* sigblock().
*/
#endif
#if __BSD_VISIBLE
#endif
#if __POSIX_VISIBLE || __XSI_VISIBLE
/*
* Flags for sigprocmask:
*/
#endif
/*
* For historical reasons; programs expect signal's return value to be
*/
#endif /* !_SYS_SIGNAL_H_ */