Sat Sep 18 17:29:05 PDT 2010  Edward Z. Yang <[email protected]>
  * Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4
  
  This is 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 interrupted.
  
  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
  interruptibility.
  
  The semantics of interruption vary from platform to platform, but the
  intent is that any blocking system calls are aborted with an error code.
  This is most useful for making function calls to system library
  functions that support interrupting.  There is no support for pre-Vista
  Windows.
  
  There is a partner testsuite patch which adds several tests for this
  functionality.

    M ./compiler/cmm/Cmm.hs -1 +1
    M ./compiler/cmm/CmmBuildInfoTables.hs -7 +8
    M ./compiler/cmm/CmmCPSGen.hs -1 +3
    M ./compiler/cmm/CmmParse.y +9
    M ./compiler/cmm/CmmStackLayout.hs -2 +2
    M ./compiler/cmm/MkZipCfgCmm.hs -3 +3
    M ./compiler/cmm/PprCmm.hs +1
    M ./compiler/cmm/ZipCfgCmmRep.hs -1 +4
    M ./compiler/codeGen/CgForeignCall.hs -1 +2
    M ./compiler/codeGen/StgCmmForeign.hs -1 +1
    M ./compiler/deSugar/DsMeta.hs -2 +6
    M ./compiler/ghci/ByteCodeAsm.lhs -3 +3
    M ./compiler/ghci/ByteCodeGen.lhs -2 +3
    M ./compiler/ghci/ByteCodeInstr.lhs -1 +7
    M ./compiler/hsSyn/Convert.lhs +1
    M ./compiler/hsSyn/HsDecls.lhs -1 +1
    M ./compiler/parser/Lexer.x +3
    M ./compiler/parser/Parser.y.pp -1 +5
    M ./compiler/prelude/ForeignCall.lhs -2 +16
    M ./docs/users_guide/ffi-chap.xml +9
    M ./includes/rts/Constants.h -2 +2
    M ./includes/rts/OSThreads.h +1
    M ./includes/rts/Threads.h -1 +1
    M ./rts/Interpreter.c -1 +2
    M ./rts/RaiseAsync.c -2 +23
    M ./rts/Schedule.c -11 +12
    M ./rts/Task.c +9
    M ./rts/Task.h +5
    M ./rts/Threads.c -2 +2
    M ./rts/posix/OSThreads.c +10
    M ./rts/sm/MarkWeak.c -1 +3
    M ./rts/win32/OSThreads.c +19

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20100919002905-6a393-195fa2a57bbe54ccbad0bcb1e966b4c556bad951.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to