1 signal.h |
1 /*- |
|
2 * Copyright (c) Symbian Software Ltd 2006-2007. All rights reserved. |
|
3 * Copyright (c) 1991, 1993 |
|
4 * The Regents of the University of California. All rights reserved. |
|
5 * |
|
6 * Redistribution and use in source and binary forms, with or without |
|
7 * modification, are permitted provided that the following conditions |
|
8 * are met: |
|
9 * 1. Redistributions of source code must retain the above copyright |
|
10 * notice, this list of conditions and the following disclaimer. |
|
11 * 2. Redistributions in binary form must reproduce the above copyright |
|
12 * notice, this list of conditions and the following disclaimer in the |
|
13 * documentation and/or other materials provided with the distribution. |
|
14 * 4. Neither the name of the University nor the names of its contributors |
|
15 * may be used to endorse or promote products derived from this software |
|
16 * without specific prior written permission. |
|
17 * |
|
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
|
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
|
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
28 * SUCH DAMAGE. |
|
29 * |
|
30 * @(#)signal.h 8.3 (Berkeley) 3/30/94 |
|
31 * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $ |
|
32 */ |
|
33 |
|
34 #ifndef _SIGNAL_H_ |
|
35 #define _SIGNAL_H_ |
|
36 |
|
37 #include <sys/cdefs.h> |
|
38 #include <sys/_types.h> |
|
39 #include <sys/signal.h> |
|
40 |
|
41 __BEGIN_DECLS |
|
42 |
|
43 struct timespec; |
|
44 /* The following definitions have been taken from siglist.c file |
|
45 * Once signals are implemented then these definitions must be moved to that |
|
46 * file. (sys_signame,sys_siglist,sys_nsig) */ |
|
47 |
|
48 static const char *const sys_signame[NSIG] = { |
|
49 "Signal 0", |
|
50 "hup", /* SIGHUP */ |
|
51 "int", /* SIGINT */ |
|
52 "quit", /* SIGQUIT */ |
|
53 "ill", /* SIGILL */ |
|
54 "trap", /* SIGTRAP */ |
|
55 "abrt", /* SIGABRT */ |
|
56 "emt", /* SIGEMT */ |
|
57 "fpe", /* SIGFPE */ |
|
58 "kill", /* SIGKILL */ |
|
59 "bus", /* SIGBUS */ |
|
60 "segv", /* SIGSEGV */ |
|
61 "sys", /* SIGSYS */ |
|
62 "pipe", /* SIGPIPE */ |
|
63 "alrm", /* SIGALRM */ |
|
64 "term", /* SIGTERM */ |
|
65 "urg", /* SIGURG */ |
|
66 "stop", /* SIGSTOP */ |
|
67 "tstp", /* SIGTSTP */ |
|
68 "cont", /* SIGCONT */ |
|
69 "chld", /* SIGCHLD */ |
|
70 "ttin", /* SIGTTIN */ |
|
71 "ttou", /* SIGTTOU */ |
|
72 "io", /* SIGIO */ |
|
73 "xcpu", /* SIGXCPU */ |
|
74 "xfsz", /* SIGXFSZ */ |
|
75 "vtalrm", /* SIGVTALRM */ |
|
76 "prof", /* SIGPROF */ |
|
77 "winch", /* SIGWINCH */ |
|
78 "info", /* SIGINFO */ |
|
79 "usr1", /* SIGUSR1 */ |
|
80 "usr2" /* SIGUSR2 */ |
|
81 }; |
|
82 |
|
83 static const char *const sys_siglist[NSIG] = { |
|
84 "Signal 0", |
|
85 "Hangup", /* SIGHUP */ |
|
86 "Interrupt", /* SIGINT */ |
|
87 "Quit", /* SIGQUIT */ |
|
88 "Illegal instruction", /* SIGILL */ |
|
89 "Trace/BPT trap", /* SIGTRAP */ |
|
90 "Abort trap", /* SIGABRT */ |
|
91 "EMT trap", /* SIGEMT */ |
|
92 "Floating point exception", /* SIGFPE */ |
|
93 "Killed", /* SIGKILL */ |
|
94 "Bus error", /* SIGBUS */ |
|
95 "Segmentation fault", /* SIGSEGV */ |
|
96 "Bad system call", /* SIGSYS */ |
|
97 "Broken pipe", /* SIGPIPE */ |
|
98 "Alarm clock", /* SIGALRM */ |
|
99 "Terminated", /* SIGTERM */ |
|
100 "Urgent I/O condition", /* SIGURG */ |
|
101 "Suspended (signal)", /* SIGSTOP */ |
|
102 "Suspended", /* SIGTSTP */ |
|
103 "Continued", /* SIGCONT */ |
|
104 "Child exited", /* SIGCHLD */ |
|
105 "Stopped (tty input)", /* SIGTTIN */ |
|
106 "Stopped (tty output)", /* SIGTTOU */ |
|
107 "I/O possible", /* SIGIO */ |
|
108 "Cputime limit exceeded", /* SIGXCPU */ |
|
109 "Filesize limit exceeded", /* SIGXFSZ */ |
|
110 "Virtual timer expired", /* SIGVTALRM */ |
|
111 "Profiling timer expired", /* SIGPROF */ |
|
112 "Window size changes", /* SIGWINCH */ |
|
113 "Information request", /* SIGINFO */ |
|
114 "User defined signal 1", /* SIGUSR1 */ |
|
115 "User defined signal 2" /* SIGUSR2 */ |
|
116 }; |
|
117 static const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]); |
|
118 |
|
119 IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); |
|
120 |
|
121 IMPORT_C int sigemptyset(sigset_t* set); |
|
122 |
|
123 __END_DECLS |
|
124 |
|
125 #endif /* !_SIGNAL_H_ */ |