Don't generate stub files when -fno-code is given.
[ghc-hetmet.git] / ghc / rts / Exception.h
index 251a957..f7832f4 100644 (file)
@@ -1,20 +1,22 @@
 /* -----------------------------------------------------------------------------
- * $Id: Exception.h,v 1.2 2000/03/17 10:24:44 simonmar Exp $
  *
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2005
  *
  * Exception support
  *
  * ---------------------------------------------------------------------------*/
 
-extern const StgInfoTable blockAsyncExceptionszh_ret_info;
-extern const StgInfoTable unblockAsyncExceptionszh_ret_info;
+#ifndef EXCEPTION_H
+#define EXCEPTION_H
+
+extern const StgRetInfoTable stg_blockAsyncExceptionszh_ret_info;
+extern const StgRetInfoTable stg_unblockAsyncExceptionszh_ret_info;
 
 /* Determine whether a thread is interruptible (ie. blocked
  * indefinitely).  Interruptible threads can be sent an exception with
  * killThread# even if they have async exceptions blocked.
  */
-static __inline__ int
+STATIC_INLINE int
 interruptible(StgTSO *t)
 {
   switch (t->why_blocked) {
@@ -22,9 +24,17 @@ interruptible(StgTSO *t)
   case BlockedOnException:
   case BlockedOnRead:
   case BlockedOnWrite:
+#if defined(mingw32_HOST_OS)
+  case BlockedOnDoProc:
+#endif
   case BlockedOnDelay:
     return 1;
+  // NB. Threaded blocked on foreign calls (BlockedOnCCall) are
+  // *not* interruptible.  We can't send these threads an exception.
   default:
     return 0;
   }
 }
+
+#endif /* EXCEPTION_H */
+