summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-07-08 14:48:51 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-07-08 14:48:51 +0000
commitad3b79d22b32760f25bf10069bd2957462be959d (patch)
tree4ec55082b2fea66458d346e4c6540649d5e4c1f8 /includes
parentcc94b30f3d854ed97ac6a7a54fa12247295219d4 (diff)
downloadhaskell-ad3b79d22b32760f25bf10069bd2957462be959d.tar.gz
New asynchronous exception control API (ghc parts)
As discussed on the libraries/haskell-cafe mailing lists http://www.haskell.org/pipermail/libraries/2010-April/013420.html This is a replacement for block/unblock in the asychronous exceptions API to fix a problem whereby a function could unblock asynchronous exceptions even if called within a blocked context. The new terminology is "mask" rather than "block" (to avoid confusion due to overloaded meanings of the latter). In GHC, we changed the names of some primops: blockAsyncExceptions# -> maskAsyncExceptions# unblockAsyncExceptions# -> unmaskAsyncExceptions# asyncExceptionsBlocked# -> getMaskingState# and added one new primop: maskUninterruptible# See the accompanying patch to libraries/base for the API changes.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/Closures.h2
-rw-r--r--includes/stg/MiscClosures.h11
2 files changed, 8 insertions, 5 deletions
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 7671c7b47e..2683ce7d49 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -161,7 +161,7 @@ typedef struct _StgUpdateFrame {
typedef struct {
StgHeader header;
- StgInt exceptions_blocked;
+ StgWord exceptions_blocked;
StgClosure *handler;
} StgCatchFrame;
diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 9b2bb600da..afe2623f1e 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -58,7 +58,9 @@ RTS_RET(stg_catch_retry_frame);
RTS_RET(stg_atomically_frame);
RTS_RET(stg_atomically_waiting_frame);
RTS_RET(stg_catch_stm_frame);
-RTS_RET(stg_unblockAsyncExceptionszh_ret);
+RTS_RET(stg_unmaskAsyncExceptionszh_ret);
+RTS_RET(stg_maskUninterruptiblezh_ret);
+RTS_RET(stg_maskAsyncExceptionszh_ret);
// RTS_FUN(stg_interp_constr_entry);
//
@@ -407,9 +409,10 @@ RTS_FUN_DECL(stg_forkzh);
RTS_FUN_DECL(stg_forkOnzh);
RTS_FUN_DECL(stg_yieldzh);
RTS_FUN_DECL(stg_killThreadzh);
-RTS_FUN_DECL(stg_asyncExceptionsBlockedzh);
-RTS_FUN_DECL(stg_blockAsyncExceptionszh);
-RTS_FUN_DECL(stg_unblockAsyncExceptionszh);
+RTS_FUN_DECL(stg_getMaskingStatezh);
+RTS_FUN_DECL(stg_maskAsyncExceptionszh);
+RTS_FUN_DECL(stg_maskUninterruptiblezh);
+RTS_FUN_DECL(stg_unmaskAsyncExceptionszh);
RTS_FUN_DECL(stg_myThreadIdzh);
RTS_FUN_DECL(stg_labelThreadzh);
RTS_FUN_DECL(stg_isCurrentThreadBoundzh);