/[ascend]/trunk/ascend/utilities/ascSignal.h
ViewVC logotype

Diff of /trunk/ascend/utilities/ascSignal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2534 by jpye, Wed Dec 15 06:35:43 2010 UTC revision 2535 by jpye, Thu Jan 26 00:19:50 2012 UTC
# Line 256  ASC_DLLSPEC void Asc_SignalRecover(int f Line 256  ASC_DLLSPEC void Asc_SignalRecover(int f
256   *               compiler/platform.   *               compiler/platform.
257   */   */
258    
259  ASC_DLLSPEC int Asc_SignalHandlerPushDefault(int signum);  /* add source line/file and signal handler name to call */
260  ASC_DLLSPEC int Asc_SignalHandlerPush(int signum, SigHandlerFn *func);  #define Asc_SignalHandlerPushDefault(SIG) Asc_SignalHandlerPush_impl((SIG),Asc_SignalTrap,"Asc_SignalTrap",__FILE__,__LINE__)
261    
262    #define Asc_SignalHandlerPush(SIG,FUNC) Asc_SignalHandlerPush_impl((SIG),(FUNC),#FUNC,__FILE__,__LINE__)
263  /**<  /**<
264   * 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.
265   * There is a maximum stack limit, so returns 1 if limit exceeded.   * There is a maximum stack limit, so returns 1 if limit exceeded.
# Line 279  ASC_DLLSPEC int Asc_SignalHandlerPush(in Line 281  ASC_DLLSPEC int Asc_SignalHandlerPush(in
281   *        popping an unintended handler.   *        popping an unintended handler.
282   */   */
283    
284  ASC_DLLSPEC int Asc_SignalHandlerPopDefault(int signum);  ASC_DLLSPEC int Asc_SignalHandlerPush_impl(int signum, SigHandlerFn *func, char *name, char *file, int line);
285  ASC_DLLSPEC int Asc_SignalHandlerPop(int signum, SigHandlerFn *func);  
286    #define Asc_SignalHandlerPopDefault(SIG) Asc_SignalHandlerPop_impl((SIG),Asc_SignalTrap,"Asc_SignalTrap",__FILE__,__LINE__)
287    
288    #define Asc_SignalHandlerPop(SIG,FUNC) Asc_SignalHandlerPop_impl((SIG),(FUNC),#FUNC,__FILE__,__LINE__)
289  /**<  /**<
290   *  Removes the last-pushed handler from the stack for signum signal types.   *  Removes the last-pushed handler from the stack for signum signal types.
291   *  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
# Line 302  ASC_DLLSPEC int Asc_SignalHandlerPop(int Line 307  ASC_DLLSPEC int Asc_SignalHandlerPop(int
307   *        only call Asc_SignalRecover() if it matches func.   *        only call Asc_SignalRecover() if it matches func.
308   */   */
309    
310    ASC_DLLSPEC int Asc_SignalHandlerPop_impl(int signum, SigHandlerFn *func, char *name, char *file, int line);
311    
312  /** Output the contents of the specified stack. For debugging. */  /** Output the contents of the specified stack. For debugging. */
313  ASC_DLLSPEC void Asc_SignalPrintStack(int signum);  ASC_DLLSPEC void Asc_SignalPrintStack(int signum);
314    

Legend:
Removed from v.2534  
changed lines
  Added in v.2535

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22