modernc.org/cc@v1.0.1/v2/headers/linux_386/usr/include/i386-linux-gnu/bits/siginfo-consts.h (about)

     1  /* siginfo constants.  Linux version.
     2     Copyright (C) 1997-2018 Free Software Foundation, Inc.
     3     This file is part of the GNU C Library.
     4  
     5     The GNU C Library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9  
    10     The GNU C Library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14  
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with the GNU C Library; if not, see
    17     <http://www.gnu.org/licenses/>.  */
    18  
    19  #ifndef _BITS_SIGINFO_CONSTS_H
    20  #define _BITS_SIGINFO_CONSTS_H 1
    21  
    22  #ifndef _SIGNAL_H
    23  #error "Don't include <bits/siginfo-consts.h> directly; use <signal.h> instead."
    24  #endif
    25  
    26  /* Most of these constants are uniform across all architectures, but there
    27     is one exception.  */
    28  #include <bits/siginfo-arch.h>
    29  #ifndef __SI_ASYNCIO_AFTER_SIGIO
    30  # define __SI_ASYNCIO_AFTER_SIGIO 1
    31  #endif
    32  
    33  /* Values for `si_code'.  Positive values are reserved for kernel-generated
    34     signals.  */
    35  enum {
    36  	SI_ASYNCNL = -60,	/* Sent by asynch name lookup completion.  */
    37  	SI_TKILL = -6,		/* Sent by tkill.  */
    38  	SI_SIGIO,		/* Sent by queued SIGIO. */
    39  #if __SI_ASYNCIO_AFTER_SIGIO
    40  	SI_ASYNCIO,		/* Sent by AIO completion.  */
    41  	SI_MESGQ,		/* Sent by real time mesq state change.  */
    42  	SI_TIMER,		/* Sent by timer expiration.  */
    43  #else
    44  	SI_MESGQ,
    45  	SI_TIMER,
    46  	SI_ASYNCIO,
    47  #endif
    48  	SI_QUEUE,		/* Sent by sigqueue.  */
    49  	SI_USER,		/* Sent by kill, sigsend.  */
    50  	SI_KERNEL = 0x80	/* Send by kernel.  */
    51  #define SI_ASYNCNL	SI_ASYNCNL
    52  #define SI_TKILL	SI_TKILL
    53  #define SI_SIGIO	SI_SIGIO
    54  #define SI_ASYNCIO	SI_ASYNCIO
    55  #define SI_MESGQ	SI_MESGQ
    56  #define SI_TIMER	SI_TIMER
    57  #define SI_ASYNCIO	SI_ASYNCIO
    58  #define SI_QUEUE	SI_QUEUE
    59  #define SI_USER		SI_USER
    60  #define SI_KERNEL	SI_KERNEL
    61  };
    62  
    63  # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
    64  /* `si_code' values for SIGILL signal.  */
    65  enum {
    66  	ILL_ILLOPC = 1,		/* Illegal opcode.  */
    67  #  define ILL_ILLOPC	ILL_ILLOPC
    68  	ILL_ILLOPN,		/* Illegal operand.  */
    69  #  define ILL_ILLOPN	ILL_ILLOPN
    70  	ILL_ILLADR,		/* Illegal addressing mode.  */
    71  #  define ILL_ILLADR	ILL_ILLADR
    72  	ILL_ILLTRP,		/* Illegal trap. */
    73  #  define ILL_ILLTRP	ILL_ILLTRP
    74  	ILL_PRVOPC,		/* Privileged opcode.  */
    75  #  define ILL_PRVOPC	ILL_PRVOPC
    76  	ILL_PRVREG,		/* Privileged register.  */
    77  #  define ILL_PRVREG	ILL_PRVREG
    78  	ILL_COPROC,		/* Coprocessor error.  */
    79  #  define ILL_COPROC	ILL_COPROC
    80  	ILL_BADSTK		/* Internal stack error.  */
    81  #  define ILL_BADSTK	ILL_BADSTK
    82  };
    83  
    84  /* `si_code' values for SIGFPE signal.  */
    85  enum {
    86  	FPE_INTDIV = 1,		/* Integer divide by zero.  */
    87  #  define FPE_INTDIV	FPE_INTDIV
    88  	FPE_INTOVF,		/* Integer overflow.  */
    89  #  define FPE_INTOVF	FPE_INTOVF
    90  	FPE_FLTDIV,		/* Floating point divide by zero.  */
    91  #  define FPE_FLTDIV	FPE_FLTDIV
    92  	FPE_FLTOVF,		/* Floating point overflow.  */
    93  #  define FPE_FLTOVF	FPE_FLTOVF
    94  	FPE_FLTUND,		/* Floating point underflow.  */
    95  #  define FPE_FLTUND	FPE_FLTUND
    96  	FPE_FLTRES,		/* Floating point inexact result.  */
    97  #  define FPE_FLTRES	FPE_FLTRES
    98  	FPE_FLTINV,		/* Floating point invalid operation.  */
    99  #  define FPE_FLTINV	FPE_FLTINV
   100  	FPE_FLTSUB		/* Subscript out of range.  */
   101  #  define FPE_FLTSUB	FPE_FLTSUB
   102  };
   103  
   104  /* `si_code' values for SIGSEGV signal.  */
   105  enum {
   106  	SEGV_MAPERR = 1,	/* Address not mapped to object.  */
   107  #  define SEGV_MAPERR	SEGV_MAPERR
   108  	SEGV_ACCERR,		/* Invalid permissions for mapped object.  */
   109  #  define SEGV_ACCERR	SEGV_ACCERR
   110  	SEGV_BNDERR,		/* Bounds checking failure.  */
   111  #  define SEGV_BNDERR	SEGV_BNDERR
   112  	SEGV_PKUERR		/* Protection key checking failure.  */
   113  #  define SEGV_PKUERR	SEGV_PKUERR
   114  };
   115  
   116  /* `si_code' values for SIGBUS signal.  */
   117  enum {
   118  	BUS_ADRALN = 1,		/* Invalid address alignment.  */
   119  #  define BUS_ADRALN	BUS_ADRALN
   120  	BUS_ADRERR,		/* Non-existant physical address.  */
   121  #  define BUS_ADRERR	BUS_ADRERR
   122  	BUS_OBJERR,		/* Object specific hardware error.  */
   123  #  define BUS_OBJERR	BUS_OBJERR
   124  	BUS_MCEERR_AR,		/* Hardware memory error: action required.  */
   125  #  define BUS_MCEERR_AR	BUS_MCEERR_AR
   126  	BUS_MCEERR_AO		/* Hardware memory error: action optional.  */
   127  #  define BUS_MCEERR_AO	BUS_MCEERR_AO
   128  };
   129  # endif
   130  
   131  # ifdef __USE_XOPEN_EXTENDED
   132  /* `si_code' values for SIGTRAP signal.  */
   133  enum {
   134  	TRAP_BRKPT = 1,		/* Process breakpoint.  */
   135  #  define TRAP_BRKPT	TRAP_BRKPT
   136  	TRAP_TRACE		/* Process trace trap.  */
   137  #  define TRAP_TRACE	TRAP_TRACE
   138  };
   139  # endif
   140  
   141  # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
   142  /* `si_code' values for SIGCHLD signal.  */
   143  enum {
   144  	CLD_EXITED = 1,		/* Child has exited.  */
   145  #  define CLD_EXITED	CLD_EXITED
   146  	CLD_KILLED,		/* Child was killed.  */
   147  #  define CLD_KILLED	CLD_KILLED
   148  	CLD_DUMPED,		/* Child terminated abnormally.  */
   149  #  define CLD_DUMPED	CLD_DUMPED
   150  	CLD_TRAPPED,		/* Traced child has trapped.  */
   151  #  define CLD_TRAPPED	CLD_TRAPPED
   152  	CLD_STOPPED,		/* Child has stopped.  */
   153  #  define CLD_STOPPED	CLD_STOPPED
   154  	CLD_CONTINUED		/* Stopped child has continued.  */
   155  #  define CLD_CONTINUED	CLD_CONTINUED
   156  };
   157  
   158  /* `si_code' values for SIGPOLL signal.  */
   159  enum {
   160  	POLL_IN = 1,		/* Data input available.  */
   161  #  define POLL_IN	POLL_IN
   162  	POLL_OUT,		/* Output buffers available.  */
   163  #  define POLL_OUT	POLL_OUT
   164  	POLL_MSG,		/* Input message available.   */
   165  #  define POLL_MSG	POLL_MSG
   166  	POLL_ERR,		/* I/O error.  */
   167  #  define POLL_ERR	POLL_ERR
   168  	POLL_PRI,		/* High priority input available.  */
   169  #  define POLL_PRI	POLL_PRI
   170  	POLL_HUP		/* Device disconnected.  */
   171  #  define POLL_HUP	POLL_HUP
   172  };
   173  # endif
   174  
   175  /* Architectures might also add architecture-specific constants.
   176     These are all considered GNU extensions.  */
   177  #ifdef __USE_GNU
   178  # include <bits/siginfo-consts-arch.h>
   179  #endif
   180  
   181  #endif