X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FException.h;h=f7832f4045c3fad6581cfee4dc5983cebc91d0df;hb=7f24ae51ed36c5c0308a2d0de23e243f32a0043c;hp=68bd4999ca32b4380c4cf3cbdbe78318313e70f7;hpb=0bffc410964e1688ad80d277d53400659e697ab5;p=ghc-hetmet.git diff --git a/ghc/rts/Exception.h b/ghc/rts/Exception.h index 68bd499..f7832f4 100644 --- a/ghc/rts/Exception.h +++ b/ghc/rts/Exception.h @@ -1,12 +1,14 @@ /* ----------------------------------------------------------------------------- - * $Id: Exception.h,v 1.5 2002/12/11 15:36:42 simonmar Exp $ * - * (c) The GHC Team, 1998-2000 + * (c) The GHC Team, 1998-2005 * * Exception support * * ---------------------------------------------------------------------------*/ +#ifndef EXCEPTION_H +#define EXCEPTION_H + extern const StgRetInfoTable stg_blockAsyncExceptionszh_ret_info; extern const StgRetInfoTable stg_unblockAsyncExceptionszh_ret_info; @@ -14,7 +16,7 @@ extern const StgRetInfoTable stg_unblockAsyncExceptionszh_ret_info; * 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 */ +