New asynchronous exception control API (ghc parts)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 8 Jul 2010 14:48:51 +0000 (14:48 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 8 Jul 2010 14:48:51 +0000 (14:48 +0000)
commitad3b79d22b32760f25bf10069bd2957462be959d
tree4ec55082b2fea66458d346e4c6540649d5e4c1f8
parentcc94b30f3d854ed97ac6a7a54fa12247295219d4
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.
compiler/prelude/primops.txt.pp
includes/rts/storage/Closures.h
includes/stg/MiscClosures.h
rts/Exception.cmm
rts/Linker.c
rts/Prelude.h
rts/RaiseAsync.c