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