1.1 --- a/epoc32/include/stdapis/signal.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/signal.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,125 @@
1.4 -signal.h
1.5 +/*-
1.6 + * Copyright (c) Symbian Software Ltd 2006-2007. All rights reserved.
1.7 + * Copyright (c) 1991, 1993
1.8 + * The Regents of the University of California. All rights reserved.
1.9 + *
1.10 + * Redistribution and use in source and binary forms, with or without
1.11 + * modification, are permitted provided that the following conditions
1.12 + * are met:
1.13 + * 1. Redistributions of source code must retain the above copyright
1.14 + * notice, this list of conditions and the following disclaimer.
1.15 + * 2. Redistributions in binary form must reproduce the above copyright
1.16 + * notice, this list of conditions and the following disclaimer in the
1.17 + * documentation and/or other materials provided with the distribution.
1.18 + * 4. Neither the name of the University nor the names of its contributors
1.19 + * may be used to endorse or promote products derived from this software
1.20 + * without specific prior written permission.
1.21 + *
1.22 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1.23 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.24 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.25 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1.26 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.27 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1.28 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.29 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1.30 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.31 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.32 + * SUCH DAMAGE.
1.33 + *
1.34 + * @(#)signal.h 8.3 (Berkeley) 3/30/94
1.35 + * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $
1.36 + */
1.37 +
1.38 +#ifndef _SIGNAL_H_
1.39 +#define _SIGNAL_H_
1.40 +
1.41 +#include <sys/cdefs.h>
1.42 +#include <sys/_types.h>
1.43 +#include <sys/signal.h>
1.44 +
1.45 +__BEGIN_DECLS
1.46 +
1.47 +struct timespec;
1.48 +/* The following definitions have been taken from siglist.c file
1.49 + * Once signals are implemented then these definitions must be moved to that
1.50 + * file. (sys_signame,sys_siglist,sys_nsig) */
1.51 +
1.52 +static const char *const sys_signame[NSIG] = {
1.53 + "Signal 0",
1.54 + "hup", /* SIGHUP */
1.55 + "int", /* SIGINT */
1.56 + "quit", /* SIGQUIT */
1.57 + "ill", /* SIGILL */
1.58 + "trap", /* SIGTRAP */
1.59 + "abrt", /* SIGABRT */
1.60 + "emt", /* SIGEMT */
1.61 + "fpe", /* SIGFPE */
1.62 + "kill", /* SIGKILL */
1.63 + "bus", /* SIGBUS */
1.64 + "segv", /* SIGSEGV */
1.65 + "sys", /* SIGSYS */
1.66 + "pipe", /* SIGPIPE */
1.67 + "alrm", /* SIGALRM */
1.68 + "term", /* SIGTERM */
1.69 + "urg", /* SIGURG */
1.70 + "stop", /* SIGSTOP */
1.71 + "tstp", /* SIGTSTP */
1.72 + "cont", /* SIGCONT */
1.73 + "chld", /* SIGCHLD */
1.74 + "ttin", /* SIGTTIN */
1.75 + "ttou", /* SIGTTOU */
1.76 + "io", /* SIGIO */
1.77 + "xcpu", /* SIGXCPU */
1.78 + "xfsz", /* SIGXFSZ */
1.79 + "vtalrm", /* SIGVTALRM */
1.80 + "prof", /* SIGPROF */
1.81 + "winch", /* SIGWINCH */
1.82 + "info", /* SIGINFO */
1.83 + "usr1", /* SIGUSR1 */
1.84 + "usr2" /* SIGUSR2 */
1.85 +};
1.86 +
1.87 +static const char *const sys_siglist[NSIG] = {
1.88 + "Signal 0",
1.89 + "Hangup", /* SIGHUP */
1.90 + "Interrupt", /* SIGINT */
1.91 + "Quit", /* SIGQUIT */
1.92 + "Illegal instruction", /* SIGILL */
1.93 + "Trace/BPT trap", /* SIGTRAP */
1.94 + "Abort trap", /* SIGABRT */
1.95 + "EMT trap", /* SIGEMT */
1.96 + "Floating point exception", /* SIGFPE */
1.97 + "Killed", /* SIGKILL */
1.98 + "Bus error", /* SIGBUS */
1.99 + "Segmentation fault", /* SIGSEGV */
1.100 + "Bad system call", /* SIGSYS */
1.101 + "Broken pipe", /* SIGPIPE */
1.102 + "Alarm clock", /* SIGALRM */
1.103 + "Terminated", /* SIGTERM */
1.104 + "Urgent I/O condition", /* SIGURG */
1.105 + "Suspended (signal)", /* SIGSTOP */
1.106 + "Suspended", /* SIGTSTP */
1.107 + "Continued", /* SIGCONT */
1.108 + "Child exited", /* SIGCHLD */
1.109 + "Stopped (tty input)", /* SIGTTIN */
1.110 + "Stopped (tty output)", /* SIGTTOU */
1.111 + "I/O possible", /* SIGIO */
1.112 + "Cputime limit exceeded", /* SIGXCPU */
1.113 + "Filesize limit exceeded", /* SIGXFSZ */
1.114 + "Virtual timer expired", /* SIGVTALRM */
1.115 + "Profiling timer expired", /* SIGPROF */
1.116 + "Window size changes", /* SIGWINCH */
1.117 + "Information request", /* SIGINFO */
1.118 + "User defined signal 1", /* SIGUSR1 */
1.119 + "User defined signal 2" /* SIGUSR2 */
1.120 +};
1.121 +static const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
1.122 +
1.123 +IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact);
1.124 +
1.125 +IMPORT_C int sigemptyset(sigset_t* set);
1.126 +
1.127 +__END_DECLS
1.128 +
1.129 +#endif /* !_SIGNAL_H_ */