1. 19 Sep, 2010 1 commit
    • Edward Z. Yang's avatar
      Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4 · 83d563cb
      Edward Z. Yang authored
      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.
      83d563cb
  2. 06 Oct, 2010 1 commit
  3. 07 Oct, 2010 1 commit
  4. 14 Sep, 2010 1 commit
    • Ian Lynagh's avatar
      Remove (most of) the FiniteMap wrapper · e95ee1f7
      Ian Lynagh authored
      We still have
          insertList, insertListWith, deleteList
      which aren't in Data.Map, and
          foldRightWithKey
      which works around the fold(r)WithKey addition and deprecation.
      e95ee1f7
  5. 13 Sep, 2010 2 commits
  6. 30 Jul, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Work around missing type signature in Happy · c800c163
      simonpj@microsoft.com authored
      Happy generates
      
            notHappyAtAll = error "Blah"
      
      without a type signature, and currently the new
      typechecker doesn't generalise it.  This patch
      says "no monomorphism restriction" which makes it
      generalise again.
      
      Better would be to add a type sig to Happy's template
      c800c163
  7. 29 Jul, 2010 1 commit
  8. 05 Aug, 2010 1 commit
  9. 15 Jul, 2010 1 commit
  10. 16 Jun, 2010 1 commit
  11. 06 Jul, 2010 1 commit
  12. 15 Jun, 2010 1 commit
  13. 22 Apr, 2010 1 commit
  14. 29 Mar, 2010 1 commit
    • Simon Marlow's avatar
      New implementation of BLACKHOLEs · 5d52d9b6
      Simon Marlow authored
      This replaces the global blackhole_queue with a clever scheme that
      enables us to queue up blocked threads on the closure that they are
      blocked on, while still avoiding atomic instructions in the common
      case.
      
      Advantages:
      
       - gets rid of a locked global data structure and some tricky GC code
         (replacing it with some per-thread data structures and different
         tricky GC code :)
      
       - wakeups are more prompt: parallel/concurrent performance should
         benefit.  I haven't seen anything dramatic in the parallel
         benchmarks so far, but a couple of threading benchmarks do improve
         a bit.
      
       - waking up a thread blocked on a blackhole is now O(1) (e.g. if
         it is the target of throwTo).
      
       - less sharing and better separation of Capabilities: communication
         is done with messages, the data structures are strictly owned by a
         Capability and cannot be modified except by sending messages.
      
       - this change will utlimately enable us to do more intelligent
         scheduling when threads block on each other.  This is what started
         off the whole thing, but it isn't done yet (#3838).
      
      I'll be documenting all this on the wiki in due course.
      5d52d9b6
  15. 09 Mar, 2010 2 commits
  16. 16 Feb, 2010 1 commit
    • Simon Marlow's avatar
      Beef up cmmMiniInline a tiny bit · 6e9501c0
      Simon Marlow authored
      Allow a temporary assignment to be pushed past an assignment to a
      global if the global is not mentioned in the rhs of the assignment we
      are inlining.
      
      This fixes up some bad code.  We should make sure we're doing
      something equivalent in the new backend in due course.
      6e9501c0
  17. 06 Jan, 2010 1 commit
  18. 02 Jan, 2010 3 commits
  19. 29 Dec, 2009 1 commit
  20. 10 Dec, 2009 1 commit
    • Simon Marlow's avatar
      Fix #3741, simplifying things in the process · f4b72748
      Simon Marlow authored
      The problem in #3741 was that we had confused column numbers with byte
      offsets, which fails in the case of UTF-8 (amongst other things).
      Fortunately we're tracking correct column offsets now, so we didn't
      have to make a calculation based on a byte offset.  I got rid of two
      fields from the PState (last_line_len and last_offs).and one field
      from the AI (alex input) constructor.
      f4b72748
  21. 07 Dec, 2009 1 commit
  22. 27 Nov, 2009 1 commit
  23. 12 Nov, 2009 1 commit
  24. 18 Sep, 2009 5 commits
  25. 06 Nov, 2009 2 commits
    • Ben.Lippmeier@anu.edu.au's avatar
      validate fixes · 374a85ae
      Ben.Lippmeier@anu.edu.au authored
      374a85ae
    • Ben.Lippmeier@anu.edu.au's avatar
      * Refactor CLabel.RtsLabel to CLabel.CmmLabel · a02e7f40
      Ben.Lippmeier@anu.edu.au authored
      The type of the CmmLabel ctor is now
        CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel
        
       - When you construct a CmmLabel you have to explicitly say what
         package it is in. Many of these will just use rtsPackageId, but
         I've left it this way to remind people not to pretend labels are
         in the RTS package when they're not. 
         
       - When parsing a Cmm file, labels that are not defined in the 
         current file are assumed to be in the RTS package. 
         
         Labels imported like
            import label
         are assumed to be in a generic "foreign" package, which is different
         from the current one.
         
         Labels imported like
            import "package-name" label
         are marked as coming from the named package.
         
         This last one is needed for the integer-gmp library as we want to
         refer to labels that are not in the same compilation unit, but
         are in the same non-rts package.
         
         This should help remove the nasty #ifdef __PIC__ stuff from
         integer-gmp/cbits/gmp-wrappers.cmm
         
      a02e7f40
  26. 22 Oct, 2009 1 commit
  27. 18 Oct, 2009 3 commits
  28. 05 Nov, 2009 1 commit
  29. 29 Oct, 2009 1 commit