OSDN Git Service

add a new function proto
authorChris Lattner <sabre@nondot.org>
Tue, 2 Aug 2005 02:13:42 +0000 (02:13 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 2 Aug 2005 02:13:42 +0000 (02:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22577 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Signals.h

index 588214e..f29fae9 100644 (file)
@@ -36,6 +36,15 @@ namespace sys {
   /// @brief Print a stack trace if a fatal signal occurs.
   void PrintStackTraceOnErrorSignal();
 
+  /// This function registers a function to be called when the user "interrupts"
+  /// the program (typically by pressing ctrl-c).  When the user interrupts the
+  /// program, the specified interrupt function is called instead of the program
+  /// being killed, and the interrupt function automatically disabled.  Note
+  /// that interrupt functions are not allowed to call any non-reentrant
+  /// functions.  An null interrupt function pointer disables the current
+  /// installed function.
+  /// @brief Register a function to be called when ctrl-c is pressed.
+  void SetInterruptFunction(void (*IF)());
 } // End sys namespace
 } // End llvm namespace