darcs patch: Add support for interruptible FFI calls (version 2)
Edward Z. Yang
ezyang at MIT.EDU
Thu Sep 2 19:44:05 EDT 2010
Thu Sep 2 19:39:29 EDT 2010 Edward Z. Yang <ezyang at mit.edu>
* Add support for interruptible FFI calls (version 2)
This is the second version of a patch that adds support for
interruptible FFI calls in the form of a new foreign import keyword
'interruptible', which can be used instead of 'safe' or 'unsafe'.
Interruptible FFI calls act like safe FFI calls, except that the worker
thread they run on may be unceremoniously terminated.
Internally, it replaces BlockedOnCCall_NoUnblockEx with
BlockedOnCCall_Interruptible, and changes the behavior of the RTS
to not modify the TSO_ flags on the event of an FFI call from
a thread that was interruptible. It also modifies the bytecode
format for foreign call, adding an extra Word16 to indicate
This patch is incomplete: it does not prevent interruptible FFI calls
from being placed on bound threads or support Windows. There is
a partner testsuite patch which adds several tests for this
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 140747 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20100902/70f32cdd/attachment-0001.bin
More information about the Cvs-ghc