filename | test/include/sys/signal.h |
changeset | 185:6755a04c447f |
author | nkeynes |
date | Tue Jul 11 01:35:27 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | First commit of system test framework. 3 initial test cases (incomplete): testide, testmath, and testta |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/include/sys/signal.h Tue Jul 11 01:35:27 2006 +00001.3 @@ -0,0 +1,182 @@1.4 +/* sys/signal.h */1.5 +1.6 +#ifndef _SYS_SIGNAL_H1.7 +#define _SYS_SIGNAL_H1.8 +1.9 +#ifdef __cplusplus1.10 +extern "C" {1.11 +#endif1.12 +1.13 +#include "_ansi.h"1.14 +1.15 +#ifndef __STRICT_ANSI__1.16 +typedef unsigned long sigset_t;1.17 +struct sigaction1.18 +{1.19 + void (*sa_handler)(int);1.20 + sigset_t sa_mask;1.21 + int sa_flags;1.22 +};1.23 +#define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */1.24 +#define SIG_SETMASK 0 /* set mask with sigprocmask() */1.25 +#define SIG_BLOCK 1 /* set of signals to block */1.26 +#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */1.27 +1.28 +/* These depend upon the type of sigset_t, which right now1.29 + is always a long.. They're in the POSIX namespace, but1.30 + are not ANSI. */1.31 +#define sigaddset(what,sig) (*(what) |= (1<<(sig)))1.32 +#define sigemptyset(what) (*(what) = 0)1.33 +1.34 +int sigprocmask (int __how, const sigset_t *__a, sigset_t *__b);1.35 +1.36 +/* protos for functions found in winsup sources */1.37 +#if defined(__CYGWIN32__)1.38 +#undef sigaddset1.39 +#undef sigemptyset1.40 +/* The first argument to kill should be pid_t. Right now1.41 + <sys/types.h> always defines pid_t to be int. If that ever1.42 + changes, then we will need to do something else, perhaps along the1.43 + lines of <machine/types.h>. */1.44 +int _EXFUN(kill, (int, int));1.45 +int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));1.46 +int _EXFUN(sigaddset, (sigset_t *, const int));1.47 +int _EXFUN(sigdelset, (sigset_t *, const int));1.48 +int _EXFUN(sigismember, (const sigset_t *, int));1.49 +int _EXFUN(sigfillset, (sigset_t *));1.50 +int _EXFUN(sigemptyset, (sigset_t *));1.51 +int _EXFUN(sigpending, (sigset_t *));1.52 +int _EXFUN(sigsuspend, (const sigset_t *));1.53 +int _EXFUN(sigpause, (int));1.54 +#endif1.55 +1.56 +#endif /* __STRICT_ANSI__ */1.57 +1.58 +#if defined(___AM29K__)1.59 +/* These all need to be defined for ANSI C, but I don't think they are1.60 + meaningful. */1.61 +#define SIGABRT 11.62 +#define SIGFPE 11.63 +#define SIGILL 11.64 +#define SIGINT 11.65 +#define SIGSEGV 11.66 +#define SIGTERM 11.67 +/* These need to be defined for POSIX, and some others do too. */1.68 +#define SIGHUP 11.69 +#define SIGQUIT 11.70 +#define NSIG 21.71 +#elif defined(__GO32__)1.72 +#define SIGINT 11.73 +#define SIGKILL 21.74 +#define SIGPIPE 31.75 +#define SIGFPE 41.76 +#define SIGHUP 51.77 +#define SIGTERM 61.78 +#define SIGSEGV 71.79 +#define SIGTSTP 81.80 +#define SIGQUIT 91.81 +#define SIGTRAP 101.82 +#define SIGILL 111.83 +#define SIGEMT 121.84 +#define SIGALRM 131.85 +#define SIGBUS 141.86 +#define SIGLOST 151.87 +#define SIGSTOP 161.88 +#define SIGABRT 171.89 +#define SIGUSR1 181.90 +#define SIGUSR2 191.91 +#define NSIG 201.92 +#elif defined(__CYGWIN32__) /* BSD signals symantics */1.93 +#define SIGHUP 1 /* hangup */1.94 +#define SIGINT 2 /* interrupt */1.95 +#define SIGQUIT 3 /* quit */1.96 +#define SIGILL 4 /* illegal instruction (not reset when caught) */1.97 +#define SIGTRAP 5 /* trace trap (not reset when caught) */1.98 +#define SIGABRT 6 /* used by abort */1.99 +#define SIGEMT 7 /* EMT instruction */1.100 +#define SIGFPE 8 /* floating point exception */1.101 +#define SIGKILL 9 /* kill (cannot be caught or ignored) */1.102 +#define SIGBUS 10 /* bus error */1.103 +#define SIGSEGV 11 /* segmentation violation */1.104 +#define SIGSYS 12 /* bad argument to system call */1.105 +#define SIGPIPE 13 /* write on a pipe with no one to read it */1.106 +#define SIGALRM 14 /* alarm clock */1.107 +#define SIGTERM 15 /* software termination signal from kill */1.108 +#define SIGURG 16 /* urgent condition on IO channel */1.109 +#define SIGSTOP 17 /* sendable stop signal not from tty */1.110 +#define SIGTSTP 18 /* stop signal from tty */1.111 +#define SIGCONT 19 /* continue a stopped process */1.112 +#define SIGCHLD 20 /* to parent on child stop or exit */1.113 +#define SIGCLD 20 /* System V name for SIGCHLD */1.114 +#define SIGTTIN 21 /* to readers pgrp upon background tty read */1.115 +#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */1.116 +#define SIGIO 23 /* input/output possible signal */1.117 +#define SIGPOLL SIGIO /* System V name for SIGIO */1.118 +#define SIGXCPU 24 /* exceeded CPU time limit */1.119 +#define SIGXFSZ 25 /* exceeded file size limit */1.120 +#define SIGVTALRM 26 /* virtual time alarm */1.121 +#define SIGPROF 27 /* profiling time alarm */1.122 +#define SIGWINCH 28 /* window changed */1.123 +#define SIGLOST 29 /* resource lost (eg, record-lock lost) */1.124 +#define SIGUSR1 30 /* user defined signal 1 */1.125 +#define SIGUSR2 31 /* user defined signal 2 */1.126 +#define NSIG 32 /* signal 0 implied */1.127 +#else1.128 +#define SIGHUP 1 /* hangup */1.129 +#define SIGINT 2 /* interrupt */1.130 +#define SIGQUIT 3 /* quit */1.131 +#define SIGILL 4 /* illegal instruction (not reset when caught) */1.132 +#define SIGTRAP 5 /* trace trap (not reset when caught) */1.133 +#define SIGIOT 6 /* IOT instruction */1.134 +#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */1.135 +#define SIGEMT 7 /* EMT instruction */1.136 +#define SIGFPE 8 /* floating point exception */1.137 +#define SIGKILL 9 /* kill (cannot be caught or ignored) */1.138 +#define SIGBUS 10 /* bus error */1.139 +#define SIGSEGV 11 /* segmentation violation */1.140 +#define SIGSYS 12 /* bad argument to system call */1.141 +#define SIGPIPE 13 /* write on a pipe with no one to read it */1.142 +#define SIGALRM 14 /* alarm clock */1.143 +#define SIGTERM 15 /* software termination signal from kill */1.144 +1.145 +#if defined(__svr4__)1.146 +/* svr4 specifics. different signals above 15, and sigaction. */1.147 +#define SIGUSR1 161.148 +#define SIGUSR2 171.149 +#define SIGCLD 181.150 +#define SIGPWR 191.151 +#define SIGWINCH 201.152 +#define SIGPOLL 22 /* 20 for x.out binaries!!!! */1.153 +#define SIGSTOP 23 /* sendable stop signal not from tty */1.154 +#define SIGTSTP 24 /* stop signal from tty */1.155 +#define SIGCONT 25 /* continue a stopped process */1.156 +#define SIGTTIN 26 /* to readers pgrp upon background tty read */1.157 +#define SIGTTOU 27 /* like TTIN for output if (tp->t_local<OSTOP) */1.158 +#define NSIG 281.159 +#else1.160 +#define SIGURG 16 /* urgent condition on IO channel */1.161 +#define SIGSTOP 17 /* sendable stop signal not from tty */1.162 +#define SIGTSTP 18 /* stop signal from tty */1.163 +#define SIGCONT 19 /* continue a stopped process */1.164 +#define SIGCHLD 20 /* to parent on child stop or exit */1.165 +#define SIGCLD 20 /* System V name for SIGCHLD */1.166 +#define SIGTTIN 21 /* to readers pgrp upon background tty read */1.167 +#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */1.168 +#define SIGIO 23 /* input/output possible signal */1.169 +#define SIGPOLL SIGIO /* System V name for SIGIO */1.170 +#define SIGXCPU 24 /* exceeded CPU time limit */1.171 +#define SIGXFSZ 25 /* exceeded file size limit */1.172 +#define SIGVTALRM 26 /* virtual time alarm */1.173 +#define SIGPROF 27 /* profiling time alarm */1.174 +#define SIGWINCH 28 /* window changed */1.175 +#define SIGLOST 29 /* resource lost (eg, record-lock lost) */1.176 +#define SIGUSR1 30 /* user defined signal 1 */1.177 +#define SIGUSR2 31 /* user defined signal 2 */1.178 +#define NSIG 32 /* signal 0 implied */1.179 +#endif1.180 +#endif1.181 +1.182 +#ifdef __cplusplus1.183 +}1.184 +#endif1.185 +#endif /* _SYS_SIGNAL_H */
.