root/compat/svr4/svr4_signal.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. svr4_sigset_t

    1 /*      $OpenBSD: svr4_signal.h,v 1.5 2002/03/14 01:26:51 millert Exp $  */
    2 /*      $NetBSD: svr4_signal.h,v 1.14 1995/10/14 20:24:41 christos Exp $         */
    3 
    4 /*
    5  * Copyright (c) 1994 Christos Zoulas
    6  * All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  * 3. The name of the author may not be used to endorse or promote products
   17  *    derived from this software without specific prior written permission
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   20  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   21  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   22  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   23  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   24  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   28  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   29  */
   30 
   31 #ifndef _SVR4_SIGNAL_H_
   32 #define _SVR4_SIGNAL_H_
   33 
   34 #include <compat/svr4/svr4_siginfo.h>
   35 
   36 #define SVR4_SIGHUP      1
   37 #define SVR4_SIGINT      2
   38 #define SVR4_SIGQUIT     3
   39 #define SVR4_SIGILL      4
   40 #define SVR4_SIGTRAP     5
   41 #define SVR4_SIGIOT      6
   42 #define SVR4_SIGABRT     6
   43 #define SVR4_SIGEMT      7
   44 #define SVR4_SIGFPE      8
   45 #define SVR4_SIGKILL     9
   46 #define SVR4_SIGBUS     10
   47 #define SVR4_SIGSEGV    11
   48 #define SVR4_SIGSYS     12
   49 #define SVR4_SIGPIPE    13
   50 #define SVR4_SIGALRM    14
   51 #define SVR4_SIGTERM    15
   52 #define SVR4_SIGUSR1    16
   53 #define SVR4_SIGUSR2    17
   54 #define SVR4_SIGCLD     18
   55 #define SVR4_SIGCHLD    18
   56 #define SVR4_SIGPWR     19
   57 #define SVR4_SIGWINCH   20
   58 #define SVR4_SIGURG     21
   59 #define SVR4_SIGPOLL    22
   60 #define SVR4_SIGIO      22
   61 #define SVR4_SIGSTOP    23
   62 #define SVR4_SIGTSTP    24
   63 #define SVR4_SIGCONT    25
   64 #define SVR4_SIGTTIN    26
   65 #define SVR4_SIGTTOU    27
   66 #define SVR4_SIGVTALRM  28
   67 #define SVR4_SIGPROF    29
   68 #define SVR4_SIGXCPU    30
   69 #define SVR4_SIGXFSZ    31
   70 #define SVR4_NSIG       32
   71 
   72 #define SVR4_SIGNO_MASK         0x00FF
   73 #define SVR4_SIGNAL_MASK        0x0000
   74 #define SVR4_SIGDEFER_MASK      0x0100
   75 #define SVR4_SIGHOLD_MASK       0x0200
   76 #define SVR4_SIGRELSE_MASK      0x0400
   77 #define SVR4_SIGIGNORE_MASK     0x0800
   78 #define SVR4_SIGPAUSE_MASK      0x1000
   79 
   80 typedef void (*svr4_sig_t)(int, svr4_siginfo_t *, void *);
   81 #define SVR4_SIG_DFL    (svr4_sig_t)     0
   82 #define SVR4_SIG_ERR    (svr4_sig_t)    -1
   83 #define SVR4_SIG_IGN    (svr4_sig_t)     1
   84 #define SVR4_SIG_HOLD   (svr4_sig_t)     2
   85 
   86 #define SVR4_SIGNO(a)   ((a) & SVR4_SIGNO_MASK)
   87 #define SVR4_SIGCALL(a) ((a) & ~SVR4_SIGNO_MASK)
   88 
   89 #define SVR4_SIG_BLOCK          1
   90 #define SVR4_SIG_UNBLOCK        2
   91 #define SVR4_SIG_SETMASK        3
   92 
   93 typedef struct {
   94         u_long bits[4];
   95 } svr4_sigset_t;
   96 
   97 struct svr4_sigaction {
   98         int             sa_flags;
   99         svr4_sig_t      sa__handler;
  100         svr4_sigset_t   sa_mask;
  101         int             sa_reserved[2];
  102 };
  103 
  104 struct svr4_sigaltstack {
  105         char            *ss_sp;
  106         int             ss_size;
  107         int             ss_flags;
  108 };
  109 
  110 /* sa_flags */
  111 #define SVR4_SA_ONSTACK         0x00000001
  112 #define SVR4_SA_RESETHAND       0x00000002
  113 #define SVR4_SA_RESTART         0x00000004
  114 #define SVR4_SA_SIGINFO         0x00000008
  115 #define SVR4_SA_NODEFER         0x00000010
  116 #define SVR4_SA_NOCLDWAIT       0x00010000      /* No zombies   */
  117 #define SVR4_SA_NOCLDSTOP       0x00020000      /* No jcl       */
  118 
  119 /* ss_flags */
  120 #define SVR4_SS_ONSTACK         0x00000001
  121 #define SVR4_SS_DISABLE         0x00000002
  122 
  123 extern int bsd_to_svr4_sig[];
  124 void bsd_to_svr4_sigaltstack(const struct sigaltstack *, struct svr4_sigaltstack *);
  125 void bsd_to_svr4_sigset(const sigset_t *, svr4_sigset_t *);
  126 void svr4_to_bsd_sigaltstack(const struct svr4_sigaltstack *, struct sigaltstack *);
  127 void svr4_to_bsd_sigset(const svr4_sigset_t *, sigset_t *);
  128 
  129 #endif /* !_SVR4_SIGNAL_H_ */

/* [<][>][^][v][top][bottom][index][help] */