STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
signal.h
Go to the documentation of this file.
1 /***
2 *signal.h - defines signal values and routines
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 * This file defines the signal values and declares the signal functions.
8 * [ANSI/System V]
9 *
10 * [Public]
11 *
12 ****/
13 
14 #pragma once
15 
16 #ifndef _INC_SIGNAL
17 #define _INC_SIGNAL
18 
19 #include <crtdefs.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24 
25 /* Define __cdecl for non-Microsoft compilers */
26 
27 #ifndef _SIG_ATOMIC_T_DEFINED
28 typedef int sig_atomic_t;
29 #define _SIG_ATOMIC_T_DEFINED
30 #endif /* _SIG_ATOMIC_T_DEFINED */
31 
32 #define NSIG 23 /* maximum signal number + 1 */
33 
34 
35 /* Signal types */
36 
37 #define SIGINT 2 /* interrupt */
38 #define SIGILL 4 /* illegal instruction - invalid function image */
39 #define SIGFPE 8 /* floating point exception */
40 #define SIGSEGV 11 /* segment violation */
41 #define SIGTERM 15 /* Software termination signal from kill */
42 #define SIGBREAK 21 /* Ctrl-Break sequence */
43 #define SIGABRT 22 /* abnormal termination triggered by abort call */
44 
45 #define SIGABRT_COMPAT 6 /* SIGABRT compatible with other platforms, same as SIGABRT */
46 
47 #ifndef _M_CEE_PURE
48 /* signal action codes */
49 
50 #define SIG_DFL (void (__cdecl *)(int))0 /* default signal action */
51 #define SIG_IGN (void (__cdecl *)(int))1 /* ignore signal */
52 #define SIG_GET (void (__cdecl *)(int))2 /* return current value */
53 #define SIG_SGE (void (__cdecl *)(int))3 /* signal gets error */
54 #define SIG_ACK (void (__cdecl *)(int))4 /* acknowledge */
55 
56 #ifdef _CRTBLD
57 /* internal use only! not valid as an argument to signal() */
58 
59 #define SIG_DIE (void (__cdecl *)(int))5 /* terminate process */
60 #endif /* _CRTBLD */
61 
62 /* signal error value (returned by signal call on error) */
63 
64 #define SIG_ERR (void (__cdecl *)(int))-1 /* signal error value */
65 #else /* _M_CEE_PURE */
66 /* signal action codes */
67 
68 #define SIG_DFL (void (__clrcall *)(int))0 /* default signal action */
69 #define SIG_IGN (void (__clrcall *)(int))1 /* ignore signal */
70 #define SIG_GET (void (__clrcall *)(int))2 /* return current value */
71 #define SIG_SGE (void (__clrcall *)(int))3 /* signal gets error */
72 #define SIG_ACK (void (__clrcall *)(int))4 /* acknowledge */
73 
74 #ifdef _CRTBLD
75 /* internal use only! not valid as an argument to signal() */
76 
77 #define SIG_DIE (void (__clrcall *)(int))5 /* terminate process */
78 #endif /* _CRTBLD */
79 
80 /* signal error value (returned by signal call on error) */
81 
82 #define SIG_ERR (void (__clrcall *)(int))-1 /* signal error value */
83 #endif /* _M_CEE_PURE */
84 
85 
86 /* pointer to exception information pointers structure */
87 
88 extern void * * __cdecl __pxcptinfoptrs(void);
89 #define _pxcptinfoptrs (*__pxcptinfoptrs())
90 
91 /* Function prototypes */
92 
93 #ifndef _M_CEE_PURE
94 _CRTIMP void (__cdecl * __cdecl signal(_In_ int _SigNum, _In_opt_ void (__cdecl * _Func)(int)))(int);
95 #endif /* _M_CEE_PURE */
96 
97 _CRTIMP int __cdecl raise(_In_ int _SigNum);
98 
99 #ifdef __cplusplus
100 }
101 #endif /* __cplusplus */
102 
103 #endif /* _INC_SIGNAL */
#define _CRTIMP
Definition: crtdefs.h:23
_CRTIMP void(__cdecl *__cdecl signal(_In_ int _SigNum, _In_opt_ void(__cdecl *_Func)(int)))(int)
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
#define _In_
Definition: sal.h:314
#define _In_opt_
Definition: sal.h:315
int sig_atomic_t
Definition: signal.h:28
void **__cdecl __pxcptinfoptrs(void)