williamr@2: /*- williamr@2: * Copyright (c) Symbian Software Ltd 2006-2007. All rights reserved. williamr@2: * Copyright (c) 1991, 1993 williamr@2: * The Regents of the University of California. All rights reserved. williamr@2: * williamr@2: * Redistribution and use in source and binary forms, with or without williamr@2: * modification, are permitted provided that the following conditions williamr@2: * are met: williamr@2: * 1. Redistributions of source code must retain the above copyright williamr@2: * notice, this list of conditions and the following disclaimer. williamr@2: * 2. Redistributions in binary form must reproduce the above copyright williamr@2: * notice, this list of conditions and the following disclaimer in the williamr@2: * documentation and/or other materials provided with the distribution. williamr@2: * 4. Neither the name of the University nor the names of its contributors williamr@2: * may be used to endorse or promote products derived from this software williamr@2: * without specific prior written permission. williamr@2: * williamr@2: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND williamr@2: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE williamr@2: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE williamr@2: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE williamr@2: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL williamr@2: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS williamr@2: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) williamr@2: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT williamr@2: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY williamr@2: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF williamr@2: * SUCH DAMAGE. williamr@2: * williamr@2: * @(#)signal.h 8.3 (Berkeley) 3/30/94 williamr@2: * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $ williamr@2: */ williamr@2: williamr@2: #ifndef _SIGNAL_H_ williamr@2: #define _SIGNAL_H_ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: __BEGIN_DECLS williamr@2: williamr@2: struct timespec; williamr@2: /* The following definitions have been taken from siglist.c file williamr@2: * Once signals are implemented then these definitions must be moved to that williamr@2: * file. (sys_signame,sys_siglist,sys_nsig) */ williamr@2: williamr@2: static const char *const sys_signame[NSIG] = { williamr@2: "Signal 0", williamr@2: "hup", /* SIGHUP */ williamr@2: "int", /* SIGINT */ williamr@2: "quit", /* SIGQUIT */ williamr@2: "ill", /* SIGILL */ williamr@2: "trap", /* SIGTRAP */ williamr@2: "abrt", /* SIGABRT */ williamr@2: "emt", /* SIGEMT */ williamr@2: "fpe", /* SIGFPE */ williamr@2: "kill", /* SIGKILL */ williamr@2: "bus", /* SIGBUS */ williamr@2: "segv", /* SIGSEGV */ williamr@2: "sys", /* SIGSYS */ williamr@2: "pipe", /* SIGPIPE */ williamr@2: "alrm", /* SIGALRM */ williamr@2: "term", /* SIGTERM */ williamr@2: "urg", /* SIGURG */ williamr@2: "stop", /* SIGSTOP */ williamr@2: "tstp", /* SIGTSTP */ williamr@2: "cont", /* SIGCONT */ williamr@2: "chld", /* SIGCHLD */ williamr@2: "ttin", /* SIGTTIN */ williamr@2: "ttou", /* SIGTTOU */ williamr@2: "io", /* SIGIO */ williamr@2: "xcpu", /* SIGXCPU */ williamr@2: "xfsz", /* SIGXFSZ */ williamr@2: "vtalrm", /* SIGVTALRM */ williamr@2: "prof", /* SIGPROF */ williamr@2: "winch", /* SIGWINCH */ williamr@2: "info", /* SIGINFO */ williamr@2: "usr1", /* SIGUSR1 */ williamr@2: "usr2" /* SIGUSR2 */ williamr@2: }; williamr@2: williamr@2: static const char *const sys_siglist[NSIG] = { williamr@2: "Signal 0", williamr@2: "Hangup", /* SIGHUP */ williamr@2: "Interrupt", /* SIGINT */ williamr@2: "Quit", /* SIGQUIT */ williamr@2: "Illegal instruction", /* SIGILL */ williamr@2: "Trace/BPT trap", /* SIGTRAP */ williamr@2: "Abort trap", /* SIGABRT */ williamr@2: "EMT trap", /* SIGEMT */ williamr@2: "Floating point exception", /* SIGFPE */ williamr@2: "Killed", /* SIGKILL */ williamr@2: "Bus error", /* SIGBUS */ williamr@2: "Segmentation fault", /* SIGSEGV */ williamr@2: "Bad system call", /* SIGSYS */ williamr@2: "Broken pipe", /* SIGPIPE */ williamr@2: "Alarm clock", /* SIGALRM */ williamr@2: "Terminated", /* SIGTERM */ williamr@2: "Urgent I/O condition", /* SIGURG */ williamr@2: "Suspended (signal)", /* SIGSTOP */ williamr@2: "Suspended", /* SIGTSTP */ williamr@2: "Continued", /* SIGCONT */ williamr@2: "Child exited", /* SIGCHLD */ williamr@2: "Stopped (tty input)", /* SIGTTIN */ williamr@2: "Stopped (tty output)", /* SIGTTOU */ williamr@2: "I/O possible", /* SIGIO */ williamr@2: "Cputime limit exceeded", /* SIGXCPU */ williamr@2: "Filesize limit exceeded", /* SIGXFSZ */ williamr@2: "Virtual timer expired", /* SIGVTALRM */ williamr@2: "Profiling timer expired", /* SIGPROF */ williamr@2: "Window size changes", /* SIGWINCH */ williamr@2: "Information request", /* SIGINFO */ williamr@2: "User defined signal 1", /* SIGUSR1 */ williamr@2: "User defined signal 2" /* SIGUSR2 */ williamr@2: }; williamr@2: static const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]); williamr@2: williamr@2: IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); williamr@2: williamr@2: IMPORT_C int sigemptyset(sigset_t* set); williamr@2: williamr@2: __END_DECLS williamr@2: williamr@2: #endif /* !_SIGNAL_H_ */