1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 /*
  31  * An application should not include this header directly.  Instead it
  32  * should be included only through the inclusion of other Sun headers.
  33  *
  34  * The contents of this header is limited to identifiers specified in the
  35  * C Standard.  Any new identifiers specified in future amendments to the
  36  * C Standard must be placed in this header.  If these new identifiers
  37  * are required to also be in the C++ Standard "std" namespace, then for
  38  * anything other than macro definitions, corresponding "using" directives
  39  * must also be added to <sys/signal.h.h>.
  40  */
  41 
  42 #ifndef _SYS_SIGNAL_ISO_H
  43 #define _SYS_SIGNAL_ISO_H
  44 
  45 #include <sys/unistd.h>           /* needed for _SC_SIGRT_MIN/MAX */
  46 
  47 #ifdef  __cplusplus
  48 extern "C" {
  49 #endif
  50 
  51 #define SIGHUP  1       /* hangup */
  52 #define SIGINT  2       /* interrupt (rubout) */
  53 #define SIGQUIT 3       /* quit (ASCII FS) */
  54 #define SIGILL  4       /* illegal instruction (not reset when caught) */
  55 #define SIGTRAP 5       /* trace trap (not reset when caught) */
  56 #define SIGIOT  6       /* IOT instruction */
  57 #define SIGABRT 6       /* used by abort, replace SIGIOT in the future */
  58 #define SIGEMT  7       /* EMT instruction */
  59 #define SIGFPE  8       /* floating point exception */
  60 #define SIGKILL 9       /* kill (cannot be caught or ignored) */
  61 #define SIGBUS  10      /* bus error */
  62 #define SIGSEGV 11      /* segmentation violation */
  63 #define SIGSYS  12      /* bad argument to system call */
  64 #define SIGPIPE 13      /* write on a pipe with no one to read it */
  65 #define SIGALRM 14      /* alarm clock */
  66 #define SIGTERM 15      /* software termination signal from kill */
  67 #define SIGUSR1 16      /* user defined signal 1 */
  68 #define SIGUSR2 17      /* user defined signal 2 */
  69 #define SIGCLD  18      /* child status change */
  70 #define SIGCHLD 18      /* child status change alias (POSIX) */
  71 #define SIGPWR  19      /* power-fail restart */
  72 #define SIGWINCH 20     /* window size change */
  73 #define SIGURG  21      /* urgent socket condition */
  74 #define SIGPOLL 22      /* pollable event occured */
  75 #define SIGIO   SIGPOLL /* socket I/O possible (SIGPOLL alias) */
  76 #define SIGSTOP 23      /* stop (cannot be caught or ignored) */
  77 #define SIGTSTP 24      /* user stop requested from tty */
  78 #define SIGCONT 25      /* stopped process has been continued */
  79 #define SIGTTIN 26      /* background tty read attempted */
  80 #define SIGTTOU 27      /* background tty write attempted */
  81 #define SIGVTALRM 28    /* virtual timer expired */
  82 #define SIGPROF 29      /* profiling timer expired */
  83 #define SIGXCPU 30      /* exceeded cpu limit */
  84 #define SIGXFSZ 31      /* exceeded file size limit */
  85 #define SIGWAITING 32   /* reserved signal no longer used by threading code */
  86 #define SIGLWP  33      /* reserved signal no longer used by threading code */
  87 #define SIGFREEZE 34    /* special signal used by CPR */
  88 #define SIGTHAW 35      /* special signal used by CPR */
  89 #define SIGCANCEL 36    /* reserved signal for thread cancellation */
  90 #define SIGLOST 37      /* resource lost (eg, record-lock lost) */
  91 #define SIGXRES 38      /* resource control exceeded */
  92 #define SIGJVM1 39      /* reserved signal for Java Virtual Machine */
  93 #define SIGJVM2 40      /* reserved signal for Java Virtual Machine */
  94 #define SIGINFO 41      /* information request */
  95 
  96 /* insert new signals here, and move _SIGRTM* appropriately */
  97 #define _SIGRTMIN 42    /* first (highest-priority) realtime signal */
  98 #define _SIGRTMAX 73    /* last (lowest-priority) realtime signal */
  99 extern long _sysconf(int);      /* System Private interface to sysconf() */
 100 #define SIGRTMIN ((int)_sysconf(_SC_SIGRT_MIN)) /* first realtime signal */
 101 #define SIGRTMAX ((int)_sysconf(_SC_SIGRT_MAX)) /* last realtime signal */
 102 
 103 #if     defined(__cplusplus)
 104 
 105 typedef void SIG_FUNC_TYP(int);
 106 typedef SIG_FUNC_TYP *SIG_TYP;
 107 #define SIG_PF SIG_TYP
 108 
 109 #define SIG_DFL (SIG_PF)0
 110 #define SIG_ERR (SIG_PF)-1
 111 #define SIG_IGN (SIG_PF)1
 112 #define SIG_HOLD (SIG_PF)2
 113 
 114 #elif   defined(__lint)
 115 
 116 #define SIG_DFL (void(*)())0
 117 #define SIG_ERR (void(*)())0
 118 #define SIG_IGN (void (*)())0
 119 #define SIG_HOLD (void(*)())0
 120 
 121 #else
 122 
 123 #define SIG_DFL (void(*)())0
 124 #define SIG_ERR (void(*)())-1
 125 #define SIG_IGN (void (*)())1
 126 #define SIG_HOLD (void(*)())2
 127 
 128 #endif
 129 
 130 #define SIG_BLOCK       1
 131 #define SIG_UNBLOCK     2
 132 #define SIG_SETMASK     3
 133 
 134 #ifdef  __cplusplus
 135 }
 136 #endif
 137 
 138 #endif /* _SYS_SIGNAL_ISO_H */