Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ACE_OS_INCLUDE_OS_SIGNAL_H
00017 #define ACE_OS_INCLUDE_OS_SIGNAL_H
00018
00019 #include "ace/pre.h"
00020
00021 #include "ace/config-lite.h"
00022
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif
00026
00027 #include "ace/os_include/sys/os_types.h"
00028
00029 #if !defined (ACE_LACKS_SIGNAL_H)
00030 extern "C" {
00031 # include <signal.h>
00032 }
00033 #endif
00034
00035
00036 #if defined (SCO)
00037 # define SIGIO SIGPOLL
00038 # include <sys/regset.h>
00039 #endif
00040
00041 #if defined (ACE_HAS_SIGINFO_T)
00042 # if !defined (ACE_LACKS_SIGINFO_H)
00043 # if defined (__QNX__) || defined (__OpenBSD__) || defined (__INTERIX)
00044 # include <sys/siginfo.h>
00045 # else
00046 # include <siginfo.h>
00047 # endif
00048 # endif
00049 #endif
00050
00051 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) && !defined (__RTP__)
00052 # include <sigLib.h>
00053 #endif
00054
00055
00056 #ifdef __cplusplus
00057 extern "C"
00058 {
00059 #endif
00060
00061 #if defined (ACE_LACKS_SIGSET) && !defined (__MINGW32__)
00062 typedef u_int sigset_t;
00063 #endif
00064
00065 #if !defined (ACE_HAS_SIG_ATOMIC_T)
00066 typedef int sig_atomic_t;
00067 #endif
00068
00069 # if !defined (SA_SIGINFO)
00070 # define SA_SIGINFO 0
00071 # endif
00072
00073 # if !defined (SA_RESTART)
00074 # define SA_RESTART 0
00075 # endif
00076
00077 #if !defined (SIGHUP)
00078 # define SIGHUP 0
00079 #endif
00080
00081 #if !defined (SIGINT)
00082 # define SIGINT 0
00083 #endif
00084
00085 #if !defined (SIGSEGV)
00086 # define SIGSEGV 0
00087 #endif
00088
00089 #if !defined (SIGIO)
00090 # define SIGIO 0
00091 #endif
00092
00093 #if !defined (SIGUSR1)
00094 # define SIGUSR1 0
00095 #endif
00096
00097 #if !defined (SIGUSR2)
00098 # define SIGUSR2 0
00099 #endif
00100
00101 #if !defined (SIGCHLD)
00102 # define SIGCHLD 0
00103 #endif
00104
00105 #if !defined (SIGCLD)
00106 # define SIGCLD SIGCHLD
00107 #endif
00108
00109 #if !defined (SIGQUIT)
00110 # define SIGQUIT 0
00111 #endif
00112
00113 #if !defined (SIGPIPE)
00114 # define SIGPIPE 0
00115 #endif
00116
00117 #if !defined (SIGALRM)
00118 # define SIGALRM 0
00119 #endif
00120
00121 #if !defined (SIGABRT)
00122 # define SIGABRT 0
00123 #endif
00124
00125 #if !defined (SIGTERM)
00126 # define SIGTERM 0
00127 #endif
00128
00129 #if !defined (SIG_DFL)
00130 # define SIG_DFL ((__sighandler_t) 0)
00131 #endif
00132
00133 #if !defined (SIG_IGN)
00134 # define SIG_IGN ((__sighandler_t) 1)
00135 #endif
00136
00137 #if !defined (SIG_ERR)
00138 # define SIG_ERR ((__sighandler_t) -1)
00139 #endif
00140
00141
00142
00143
00144
00145
00146 # define ACE_SIGIO -1
00147 # define ACE_SIGURG -2
00148 # define ACE_CLOEXEC -3
00149
00150 #if defined (ACE_VXWORKS)
00151 # define ACE_NSIG (_NSIGS + 1)
00152 #elif defined (__Lynx__) || defined (ACE_HAS_RTEMS)
00153 # define ACE_NSIG (NSIG + 1)
00154 #else
00155
00156
00157 # define ACE_NSIG NSIG
00158 #endif
00159
00160 #if defined (ACE_HAS_WINCE)
00161 typedef void (__cdecl * __sighandler_t)(int);
00162 #endif
00163
00164 #if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES)
00165
00166 typedef void (*ACE_SignalHandler)(int);
00167 typedef void (*ACE_SignalHandlerV)(int);
00168 #elif defined (ACE_HAS_LYNXOS4_SIGNALS) || defined (ACE_HAS_TANDEM_SIGNALS)
00169 typedef void (*ACE_SignalHandler)(...);
00170 typedef void (*ACE_SignalHandlerV)(...);
00171 #elif defined (ACE_HAS_SVR4_SIGNAL_T)
00172
00173 typedef void (*ACE_SignalHandler)(int);
00174 typedef void (*ACE_SignalHandlerV)(void);
00175 #elif defined (ACE_WIN32)
00176 typedef void (__cdecl *ACE_SignalHandler)(int);
00177 typedef void (__cdecl *ACE_SignalHandlerV)(int);
00178 #elif defined (ACE_HAS_UNIXWARE_SVR4_SIGNAL_T)
00179 typedef void (*ACE_SignalHandler)(int);
00180 typedef void (*ACE_SignalHandlerV)(...);
00181 #elif defined (INTEGRITY)
00182 typedef void (*ACE_SignalHandler)();
00183 typedef void (*ACE_SignalHandlerV)(int);
00184 #elif defined (ACE_HAS_RTEMS)
00185 typedef void (*ACE_SignalHandler)();
00186 typedef void (*ACE_SignalHandlerV)();
00187 #else
00188 # if defined (SIG_PF)
00189 # define ACE_SignalHandler SIG_PF
00190 # else
00191 typedef void (*ACE_SignalHandler)(int);
00192 # endif
00193 typedef void (*ACE_SignalHandlerV)(...);
00194 #endif
00195
00196 #if defined (ACE_LACKS_SIGACTION)
00197 struct sigaction
00198 {
00199 int sa_flags;
00200 ACE_SignalHandlerV sa_handler;
00201 sigset_t sa_mask;
00202 };
00203 #endif
00204
00205
00206 #if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
00207 # define ACE_SIGRTMIN SIGRTMIN
00208 # define ACE_SIGRTMAX SIGRTMAX
00209 #else
00210 # ifndef ACE_SIGRTMIN
00211 # define ACE_SIGRTMIN 0
00212 # endif
00213 # ifndef ACE_SIGRTMAX
00214 # define ACE_SIGRTMAX 0
00215 # endif
00216 #endif
00217
00218 #if defined (DIGITAL_UNIX)
00219
00220
00221
00222
00223 # if defined (__DECCXX_VER)
00224 # undef sigwait
00225
00226
00227
00228 int _Psigwait __((const sigset_t *set, int *sig));
00229 # endif
00230 #elif !defined (ACE_HAS_SIGWAIT)
00231 # if defined(ACE_HAS_RTEMS)
00232 int sigwait (const sigset_t *set, int *sig);
00233 # else
00234 int sigwait (sigset_t *set);
00235 # endif
00236 #endif
00237
00238 #if !defined (ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE)
00239 int pthread_sigmask(int, const sigset_t *, sigset_t *);
00240 #endif
00241
00242 #ifdef __cplusplus
00243 }
00244 #endif
00245
00246 #include "ace/os_include/os_ucontext.h"
00247
00248 #include "ace/post.h"
00249 #endif