95 |
Requires: |
Requires: |
96 |
#include "utilities/ascConfig.h" |
#include "utilities/ascConfig.h" |
97 |
*//* |
*//* |
98 |
Signal handling protocol definitions for ASCEND |
by Benjamin Andrew Allan, May 27, 1997 |
99 |
May 27, 1997 |
Last in CVS: $Revision: 1.6 $ $Date: 1998/01/10 18:00:05 $ $Author: ballan $ |
|
By Benjamin Andrew Allan |
|
|
Version: $Revision: 1.6 $ |
|
|
Version control file: $RCSfile: ascSignal.h,v $ |
|
|
Date last modified: $Date: 1998/01/10 18:00:05 $ |
|
|
Last modified by: $Author: ballan $ |
|
100 |
*/ |
*/ |
101 |
|
|
102 |
#ifndef ASC_ASCSIGNAL_H |
#ifndef ASC_ASCSIGNAL_H |
103 |
#define ASC_ASCSIGNAL_H |
#define ASC_ASCSIGNAL_H |
104 |
|
|
|
#ifndef lint |
|
|
static CONST char ascSignalRCS[] = "$Id: ascSignal.h,v 1.6 1998/01/10 18:00:05 ballan Exp $"; |
|
|
#endif |
|
|
|
|
105 |
#include <signal.h> |
#include <signal.h> |
106 |
#include <setjmp.h> |
#include <setjmp.h> |
107 |
#include "utilities/ascConfig.h" |
#include "utilities/ascConfig.h" |
112 |
# include <unistd.h> |
# include <unistd.h> |
113 |
#endif |
#endif |
114 |
|
|
115 |
typedef void (*SigHandler)(int); |
typedef void SigHandlerFn(int); |
116 |
/**< Signature of a signal handling function. */ |
/**< Signature of a signal handling function. */ |
117 |
|
|
118 |
#define MAX_TRAP_DEPTH 40L |
#define MAX_TRAP_DEPTH 40L |
124 |
|
|
125 |
extern jmp_buf g_foreign_code_call_env; |
extern jmp_buf g_foreign_code_call_env; |
126 |
/**< |
/**< |
127 |
* Not currently in use. Should be when we get to a unified |
Not currently in use. Should be when we get to a unified |
128 |
* standard for signal handling. |
standard for signal handling. |
129 |
* @todo Implement use of g_foreign_code_call_env? |
@todo Implement use of g_foreign_code_call_env? |
130 |
*/ |
*/ |
131 |
|
|
132 |
ASC_DLLSPEC(void ) Asc_SignalTrap(int sigval); |
ASC_DLLSPEC(void ) Asc_SignalTrap(int sigval); |
133 |
/**< |
/**< |
220 |
* compiler/platform. |
* compiler/platform. |
221 |
*/ |
*/ |
222 |
|
|
223 |
ASC_DLLSPEC(int ) Asc_SignalHandlerPush(int signum, SigHandler func); |
ASC_DLLSPEC(int ) Asc_SignalHandlerPush(int signum, SigHandlerFn *func); |
224 |
/**< |
/**< |
225 |
* Adds a handler to the stack of signal handlers for the given signal. |
* Adds a handler to the stack of signal handlers for the given signal. |
226 |
* There is a maximum stack limit, so returns 1 if limit exceeded. |
* There is a maximum stack limit, so returns 1 if limit exceeded. |
242 |
* popping an unintended handler. |
* popping an unintended handler. |
243 |
*/ |
*/ |
244 |
|
|
245 |
ASC_DLLSPEC(int ) Asc_SignalHandlerPop(int signum, SigHandler func); |
ASC_DLLSPEC(int ) Asc_SignalHandlerPop(int signum, SigHandlerFn *func); |
246 |
/**< |
/**< |
247 |
* Removes the last-pushed handler from the stack for signum signal types. |
* Removes the last-pushed handler from the stack for signum signal types. |
248 |
* If the removed handler is the same as func, it is uninstalled and |
* If the removed handler is the same as func, it is uninstalled and |