]>
sourceware.org Git - glibc.git/blob - bits/siginfo.h
1 /* siginfo_t, sigevent and constants. Stub version.
2 Copyright (C) 1997, 1998 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #if !defined _SIGNAL_H && !defined __need_siginfo_t
21 # error "Never include this file directly. Use <signal.h> instead"
24 #if (!defined __have_siginfo_t \
25 && (defined _SIGNAL_H || defined __need_siginfo_t))
26 # define __have_siginfo_t 1
28 /* Type for data associated with a signal. */
35 typedef struct siginfo
37 int si_signo
; /* Signal number. */
38 int si_errno
; /* If non-zero, an errno value associated with
39 this signal, as defined in <errno.h>. */
40 int si_code
; /* Signal code. */
41 __pid_t si_pid
; /* Sending process ID. */
42 __uid_t si_uid
; /* Real user ID of sending process. */
43 void *si_addr
; /* Address of faulting instruction. */
44 int si_status
; /* Exit value or signal. */
45 long int si_band
; /* Band event for SIGPOLL. */
46 union sigval si_value
; /* Signal value. */
50 /* Values for `si_code'. Positive values are reserved for kernel-generated
54 SI_ASYNCIO
= -4, /* Sent by AIO completion. */
55 # define SI_ASYNCIO SI_ASYNCIO
56 SI_MESGQ
, /* Sent by real time mesq state change. */
57 # define SI_MESGQ SI_MESGQ
58 SI_TIMER
, /* Sent by timer expiration. */
59 # define SI_TIMER SI_TIMER
60 SI_QUEUE
, /* Sent by sigqueue. */
61 # define SI_QUEUE SI_QUEUE
62 SI_USER
/* Sent by kill, sigsend, raise. */
63 # define SI_USER SI_USER
67 /* `si_code' values for SIGILL signal. */
70 ILL_ILLOPC
= 1, /* Illegal opcode. */
71 # define ILL_ILLOPC ILL_ILLOPC
72 ILL_ILL_OPN
, /* Illegal operand. */
73 # define ILL_ILLOPN ILL_ILLOPN
74 ILL_ILLADR
, /* Illegal addressing mode. */
75 # define ILL_ILLADR ILL_ILLADR
76 ILL_ILLTRP
, /* Illegal trap. */
77 # define ILL_ILLTRP ILL_ILLTRP
78 ILL_PRVOPC
, /* Privileged opcode. */
79 # define ILL_PRVOPC ILL_PRVOPC
80 ILL_PRVREG
, /* Privileged register. */
81 # define ILL_PRVREG ILL_PRVREG
82 ILL_COPROC
, /* Coprocessor error. */
83 # define ILL_COPROC ILL_COPROC
84 ILL_BADSTK
/* Internal stack error. */
85 # define ILL_BADSTK ILL_BADSTK
88 /* `si_code' values for SIGFPE signal. */
91 FPE_INTDIV
= 1, /* Integer divide by zero. */
92 # define FPE_INTDIV FPE_INTDIV
93 FPE_INTOVF
, /* Integer overflow. */
94 # define FPE_INTOVF FPE_INTOVF
95 FPE_FLTDIV
, /* Floating point divide by zero. */
96 # define FPE_FLTDIV FPE_FLTDIV
97 FPE_FLTOVF
, /* Floating point overflow. */
98 # define FPE_FLTOVF FPE_FLTOVF
99 FPE_FLTUND
, /* Floating point underflow. */
100 # define FPE_FLTUND FPE_FLTUND
101 FPE_FLTRES
, /* Floating point inexact result. */
102 # define FPE_FLTRES FPE_FLTRES
103 FPE_FLTINV
, /* Floating point invalid operation. */
104 # define FPE_FLTINV FPE_FLTINV
105 FPE_FLTSUB
/* Subscript out of range. */
106 # define FPE_FLTSUB FPE_FLTSUB
109 /* `si_code' values for SIGSEGV signal. */
112 SEGV_MAPERR
= 1, /* Address not mapped to object. */
113 # define SEGV_MAPERR SEGV_MAPERR
114 SEGV_ACCERR
/* Invalid permissions for mapped object. */
115 # define SEGV_ACCERR SEGV_ACCERR
118 /* `si_code' values for SIGBUS signal. */
121 BUS_ADRALN
= 1, /* Invalid address alignment. */
122 # define BUS_ADRALN BUS_ADRALN
123 BUS_ADRERR
, /* Non-existant physical address. */
124 # define BUS_ADRERR BUS_ADRERR
125 BUS_OBJERR
/* Object specific hardware error. */
126 # define BUS_OBJERR BUS_OBJERR
129 /* `si_code' values for SIGTRAP signal. */
132 TRAP_BRKPT
= 1, /* Process breakpoint. */
133 # define TRAP_BRKPT TRAP_BRKPT
134 TRAP_TRACE
/* Process trace trap. */
135 # define TRAP_TRACE TRAP_TRACE
138 /* `si_code' values for SIGCHLD signal. */
141 CLD_EXITED
= 1, /* Child has exited. */
142 # define CLD_EXITED CLD_EXITED
143 CLD_KILLED
, /* Child was killed. */
144 # define CLD_KILLED CLD_KILLED
145 CLD_DUMPED
, /* Child terminated abnormally. */
146 # define CLD_DUMPED CLD_DUMPED
147 CLD_TRAPPED
, /* Traced child has trapped. */
148 # define CLD_TRAPPED CLD_TRAPPED
149 CLD_STOPPED
, /* Child has stopped. */
150 # define CLD_STOPPED CLD_STOPPED
151 CLD_CONTINUED
/* Stopped child has continued. */
152 # define CLD_CONTINUED CLD_CONTINUED
155 /* `si_code' values for SIGPOLL signal. */
158 POLL_IN
= 1, /* Data input available. */
159 # define POLL_IN POLL_IN
160 POLL_OUT
, /* Output buffers available. */
161 # define POLL_OUT POLL_OUT
162 POLL_MSG
, /* Input message available. */
163 # define POLL_MSG POLL_MSG
164 POLL_ERR
, /* I/O error. */
165 # define POLL_ERR POLL_ERR
166 POLL_PRI
, /* High priority input available. */
167 # define POLL_PRI POLL_PRI
168 POLL_HUP
/* Device disconnected. */
169 # define POLL_HUP POLL_HUP
172 # undef __need_siginfo_t
173 #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
176 #if defined _SIGNAL_H && !defined __have_sigevent_t
177 # define __have_sigevent_t 1
179 /* Structure to transport application-defined values with signals. */
180 # define SIGEV_MAX_SIZE 64
181 # define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE / sizeof (int)) - 3)
183 typedef struct sigevent
185 sigval_t sigev_value
;
188 void (*sigev_notify_function
) __PMT ((sigval_t
)); /* Function to start. */
189 void *sigev_notify_attributes
; /* Really pthread_attr_t.*/
192 /* `sigev_notify' values. */
195 SIGEV_SIGNAL
= 0, /* Notify via signal. */
196 # define SIGEV_SIGNAL SIGEV_SIGNAL
197 SIGEV_NONE
, /* Other notification: meaningless. */
198 # define SIGEV_NONE SIGEV_NONE
199 SIGEV_THREAD
/* Deliver via thread creation. */
200 # define SIGEV_THREAD SIGEV_THREAD
203 #endif /* have _SIGNAL_H. */
This page took 0.046241 seconds and 5 git commands to generate.