[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / rts / Exception.h
index 3e150f9..c20be8f 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Exception.h,v 1.3 2000/11/13 14:40:37 simonmar Exp $
+ * $Id: Exception.h,v 1.9 2004/08/13 13:09:46 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -7,14 +7,14 @@
  *
  * ---------------------------------------------------------------------------*/
 
-extern const StgInfoTable stg_blockAsyncExceptionszh_ret_info;
-extern const StgInfoTable stg_unblockAsyncExceptionszh_ret_info;
+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
+INLINE_HEADER int
 interruptible(StgTSO *t)
 {
   switch (t->why_blocked) {
@@ -22,9 +22,15 @@ interruptible(StgTSO *t)
   case BlockedOnException:
   case BlockedOnRead:
   case BlockedOnWrite:
+#if defined(mingw32_TARGET_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;
   }
 }
+