Annotation of sys/compat/freebsd/freebsd_signal.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: freebsd_signal.h,v 1.3 2003/06/02 23:28:00 millert Exp $ */
2: /* $NetBSD: signal.h,v 1.42 1998/12/21 10:35:00 drochner Exp $ */
3:
4: /*
5: * Copyright (c) 1982, 1986, 1989, 1991, 1993
6: * The Regents of the University of California. All rights reserved.
7: * (c) UNIX System Laboratories, Inc.
8: * All or some portions of this file are derived from material licensed
9: * to the University of California by American Telephone and Telegraph
10: * Co. or Unix System Laboratories, Inc. and are reproduced herein with
11: * the permission of UNIX System Laboratories, Inc.
12: *
13: * Redistribution and use in source and binary forms, with or without
14: * modification, are permitted provided that the following conditions
15: * are met:
16: * 1. Redistributions of source code must retain the above copyright
17: * notice, this list of conditions and the following disclaimer.
18: * 2. Redistributions in binary form must reproduce the above copyright
19: * notice, this list of conditions and the following disclaimer in the
20: * documentation and/or other materials provided with the distribution.
21: * 3. Neither the name of the University nor the names of its contributors
22: * may be used to endorse or promote products derived from this software
23: * without specific prior written permission.
24: *
25: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35: * SUCH DAMAGE.
36: *
37: * @(#)signal.h 8.4 (Berkeley) 5/4/95
38: */
39:
40: #ifndef _FREEBSD_SYS_SIGNAL_H_
41: #define _FREEBSD_SYS_SIGNAL_H_
42:
43: typedef struct {
44: u_int32_t __bits[4];
45: } freebsd_sigset_t;
46:
47: union freebsd_sigval {
48: /* Members as suggested by Annex C of POSIX 1003.1b. */
49: int freebsd_sigval_int;
50: void *freebsd_sigval_ptr;
51: };
52:
53: typedef struct __freebsd_siginfo {
54: int freebsd_si_signo; /* signal number */
55: int freebsd_si_errno; /* errno association */
56: /*
57: * Cause of signal, one of the SI_ macros or signal-specific
58: * values, i.e. one of the FPE_... values for SIGFPE. This
59: * value is equivalent to the second argument to an old-style
60: * FreeBSD signal handler.
61: */
62: int freebsd_si_code; /* signal code */
63: int freebsd_si_pid; /* sending process */
64: unsigned int freebsd_si_uid; /* sender's ruid */
65: int freebsd_si_status; /* exit value */
66: void *freebsd_si_addr; /* faulting instruction */
67: union freebsd_sigval freebsd_si_value; /* signal value */
68: long freebsd_si_band; /* band event for SIGPOLL */
69: int __spare__[7]; /* gimme some slack */
70: } freebsd_siginfo_t;
71:
72: /*
73: * Signal vector "template" used in sigaction call.
74: */
75: struct freebsd_sigaction {
76: union {
77: void (*__freebsd_sa_handler)(int);
78: void (*__freebsd_sa_sigaction)(int, struct __freebsd_siginfo *, void *);
79: } __freebsd_sigaction_u; /* signal handler */
80: int freebsd_sa_flags; /* see signal options below */
81: freebsd_sigset_t freebsd_sa_mask; /* signal mask to apply */
82: };
83: #define freebsd_sa_handler __freebsd_sigaction_u.__freebsd_sa_handler
84: #define freebsd_sa_sigaction __freebsd_sigaction_u.__freebsd_sa_sigaction
85:
86: #endif /* !_FREEBSD_SYS_SIGNAL_H_ */
CVSweb