Search
lxdream.org :: lxdream/test/include/sys/signal.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/sys/signal.h
changeset 185:6755a04c447f
author nkeynes
date Tue Jul 11 01:35:27 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
view annotate diff log raw
     1 /* sys/signal.h */
     3 #ifndef _SYS_SIGNAL_H
     4 #define _SYS_SIGNAL_H
     6 #ifdef __cplusplus
     7 extern "C" {
     8 #endif
    10 #include "_ansi.h"
    12 #ifndef __STRICT_ANSI__
    13 typedef unsigned long sigset_t;
    14 struct sigaction 
    15 {
    16 	void (*sa_handler)(int);
    17 	sigset_t sa_mask;
    18 	int sa_flags;
    19 };
    20 #define SA_NOCLDSTOP 1	/* only value supported now for sa_flags */
    21 #define SIG_SETMASK 0	/* set mask with sigprocmask() */
    22 #define SIG_BLOCK 1	/* set of signals to block */
    23 #define SIG_UNBLOCK 2	/* set of signals to, well, unblock */
    25 /* These depend upon the type of sigset_t, which right now 
    26    is always a long.. They're in the POSIX namespace, but
    27    are not ANSI. */
    28 #define sigaddset(what,sig) (*(what) |= (1<<(sig)))
    29 #define sigemptyset(what)   (*(what) = 0)
    31 int sigprocmask (int __how, const sigset_t *__a, sigset_t *__b);
    33 /* protos for functions found in winsup sources */
    34 #if defined(__CYGWIN32__)
    35 #undef sigaddset
    36 #undef sigemptyset
    37 /* The first argument to kill should be pid_t.  Right now
    38    <sys/types.h> always defines pid_t to be int.  If that ever
    39    changes, then we will need to do something else, perhaps along the
    40    lines of <machine/types.h>.  */
    41 int _EXFUN(kill, (int, int));
    42 int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
    43 int _EXFUN(sigaddset, (sigset_t *, const int));
    44 int _EXFUN(sigdelset, (sigset_t *, const int));
    45 int _EXFUN(sigismember, (const sigset_t *, int));
    46 int _EXFUN(sigfillset, (sigset_t *));
    47 int _EXFUN(sigemptyset, (sigset_t *));
    48 int _EXFUN(sigpending, (sigset_t *));
    49 int _EXFUN(sigsuspend, (const sigset_t *));
    50 int _EXFUN(sigpause, (int));
    51 #endif
    53 #endif /* __STRICT_ANSI__ */
    55 #if defined(___AM29K__)
    56 /* These all need to be defined for ANSI C, but I don't think they are
    57    meaningful.  */
    58 #define SIGABRT 1
    59 #define SIGFPE 1
    60 #define SIGILL 1
    61 #define SIGINT 1
    62 #define SIGSEGV 1
    63 #define SIGTERM 1
    64 /* These need to be defined for POSIX, and some others do too.  */
    65 #define SIGHUP 1
    66 #define SIGQUIT 1
    67 #define NSIG 2
    68 #elif defined(__GO32__)
    69 #define SIGINT  1
    70 #define SIGKILL 2
    71 #define SIGPIPE 3
    72 #define SIGFPE  4
    73 #define SIGHUP  5
    74 #define SIGTERM 6
    75 #define SIGSEGV 7
    76 #define SIGTSTP 8
    77 #define SIGQUIT 9
    78 #define SIGTRAP 10
    79 #define SIGILL  11
    80 #define SIGEMT  12
    81 #define SIGALRM 13
    82 #define SIGBUS  14
    83 #define SIGLOST 15
    84 #define SIGSTOP 16
    85 #define SIGABRT 17
    86 #define SIGUSR1	18
    87 #define SIGUSR2	19
    88 #define NSIG    20
    89 #elif defined(__CYGWIN32__)	/* BSD signals symantics */
    90 #define	SIGHUP	1	/* hangup */
    91 #define	SIGINT	2	/* interrupt */
    92 #define	SIGQUIT	3	/* quit */
    93 #define	SIGILL	4	/* illegal instruction (not reset when caught) */
    94 #define	SIGTRAP	5	/* trace trap (not reset when caught) */
    95 #define	SIGABRT 6	/* used by abort */
    96 #define	SIGEMT	7	/* EMT instruction */
    97 #define	SIGFPE	8	/* floating point exception */
    98 #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
    99 #define	SIGBUS	10	/* bus error */
   100 #define	SIGSEGV	11	/* segmentation violation */
   101 #define	SIGSYS	12	/* bad argument to system call */
   102 #define	SIGPIPE	13	/* write on a pipe with no one to read it */
   103 #define	SIGALRM	14	/* alarm clock */
   104 #define	SIGTERM	15	/* software termination signal from kill */
   105 #define	SIGURG	16	/* urgent condition on IO channel */
   106 #define	SIGSTOP	17	/* sendable stop signal not from tty */
   107 #define	SIGTSTP	18	/* stop signal from tty */
   108 #define	SIGCONT	19	/* continue a stopped process */
   109 #define	SIGCHLD	20	/* to parent on child stop or exit */
   110 #define	SIGCLD	20	/* System V name for SIGCHLD */
   111 #define	SIGTTIN	21	/* to readers pgrp upon background tty read */
   112 #define	SIGTTOU	22	/* like TTIN for output if (tp->t_local&LTOSTOP) */
   113 #define	SIGIO	23	/* input/output possible signal */
   114 #define	SIGPOLL	SIGIO	/* System V name for SIGIO */
   115 #define	SIGXCPU	24	/* exceeded CPU time limit */
   116 #define	SIGXFSZ	25	/* exceeded file size limit */
   117 #define	SIGVTALRM 26	/* virtual time alarm */
   118 #define	SIGPROF	27	/* profiling time alarm */
   119 #define	SIGWINCH 28	/* window changed */
   120 #define	SIGLOST 29	/* resource lost (eg, record-lock lost) */
   121 #define	SIGUSR1 30	/* user defined signal 1 */
   122 #define	SIGUSR2 31	/* user defined signal 2 */
   123 #define NSIG	32      /* signal 0 implied */
   124 #else
   125 #define	SIGHUP	1	/* hangup */
   126 #define	SIGINT	2	/* interrupt */
   127 #define	SIGQUIT	3	/* quit */
   128 #define	SIGILL	4	/* illegal instruction (not reset when caught) */
   129 #define	SIGTRAP	5	/* trace trap (not reset when caught) */
   130 #define	SIGIOT	6	/* IOT instruction */
   131 #define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
   132 #define	SIGEMT	7	/* EMT instruction */
   133 #define	SIGFPE	8	/* floating point exception */
   134 #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
   135 #define	SIGBUS	10	/* bus error */
   136 #define	SIGSEGV	11	/* segmentation violation */
   137 #define	SIGSYS	12	/* bad argument to system call */
   138 #define	SIGPIPE	13	/* write on a pipe with no one to read it */
   139 #define	SIGALRM	14	/* alarm clock */
   140 #define	SIGTERM	15	/* software termination signal from kill */
   142 #if defined(__svr4__)
   143 /* svr4 specifics. different signals above 15, and sigaction. */
   144 #define	SIGUSR1	16
   145 #define SIGUSR2	17
   146 #define SIGCLD	18
   147 #define	SIGPWR	19
   148 #define SIGWINCH 20
   149 #define	SIGPOLL	22	/* 20 for x.out binaries!!!! */
   150 #define	SIGSTOP	23	/* sendable stop signal not from tty */
   151 #define	SIGTSTP	24	/* stop signal from tty */
   152 #define	SIGCONT	25	/* continue a stopped process */
   153 #define	SIGTTIN	26	/* to readers pgrp upon background tty read */
   154 #define	SIGTTOU	27	/* like TTIN for output if (tp->t_local&LTOSTOP) */
   155 #define NSIG	28	
   156 #else
   157 #define	SIGURG	16	/* urgent condition on IO channel */
   158 #define	SIGSTOP	17	/* sendable stop signal not from tty */
   159 #define	SIGTSTP	18	/* stop signal from tty */
   160 #define	SIGCONT	19	/* continue a stopped process */
   161 #define	SIGCHLD	20	/* to parent on child stop or exit */
   162 #define	SIGCLD	20	/* System V name for SIGCHLD */
   163 #define	SIGTTIN	21	/* to readers pgrp upon background tty read */
   164 #define	SIGTTOU	22	/* like TTIN for output if (tp->t_local&LTOSTOP) */
   165 #define	SIGIO	23	/* input/output possible signal */
   166 #define	SIGPOLL	SIGIO	/* System V name for SIGIO */
   167 #define	SIGXCPU	24	/* exceeded CPU time limit */
   168 #define	SIGXFSZ	25	/* exceeded file size limit */
   169 #define	SIGVTALRM 26	/* virtual time alarm */
   170 #define	SIGPROF	27	/* profiling time alarm */
   171 #define	SIGWINCH 28	/* window changed */
   172 #define	SIGLOST 29	/* resource lost (eg, record-lock lost) */
   173 #define	SIGUSR1 30	/* user defined signal 1 */
   174 #define	SIGUSR2 31	/* user defined signal 2 */
   175 #define NSIG	32      /* signal 0 implied */
   176 #endif
   177 #endif
   179 #ifdef __cplusplus
   180 }
   181 #endif
   182 #endif /* _SYS_SIGNAL_H */
.