[commit: ghc] master: Implement atomicReadMVar, fixing #4001. (70e2063)

Edward Z. Yang ezyang at MIT.EDU
Wed Jul 10 00:58:47 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/70e20631742e516c6a11c3c112fbd5b4a08c15ac

>---------------------------------------------------------------

commit 70e20631742e516c6a11c3c112fbd5b4a08c15ac
Author: Edward Z. Yang <ezyang at mit.edu>
Date:   Mon Jul 8 11:03:35 2013 -0700

    Implement atomicReadMVar, fixing #4001.
    
    We add the invariant to the MVar blocked threads queue that
    threads blocked on an atomic read are always at the front of
    the queue.  This invariant is easy to maintain, since takers
    are only ever added to the end of the queue.
    
    Signed-off-by: Edward Z. Yang <ezyang at mit.edu>

 compiler/prelude/primops.txt.pp |  9 +++++
 includes/rts/Constants.h        | 25 ++++++-------
 includes/stg/MiscClosures.h     |  3 ++
 rts/HeapStackCheck.cmm          | 31 ++++++++++++++--
 rts/Linker.c                    |  2 ++
 rts/PrimOps.cmm                 | 79 +++++++++++++++++++++++++++++++++++++++--
 rts/RaiseAsync.c                |  4 ++-
 rts/RaiseAsync.h                |  1 +
 rts/RetainerProfile.c           |  1 +
 rts/Schedule.c                  |  2 ++
 rts/Threads.c                   |  4 +++
 rts/Trace.c                     |  1 +
 rts/sm/Compact.c                |  1 +
 rts/sm/Sanity.c                 |  1 +
 rts/sm/Scav.c                   |  1 +
 15 files changed, 147 insertions(+), 18 deletions(-)


Diff suppressed because of size. To see it, use:

    git show 70e20631742e516c6a11c3c112fbd5b4a08c15ac



More information about the ghc-commits mailing list