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