diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2013-07-17 15:49:47 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2013-07-17 15:49:47 -0700 |
commit | 95e6865ecf06b2bd80fa737e4fa4a24beaae25c5 (patch) | |
tree | ffeffc1df6aa92f2b6404e954de520dddb895e35 /rts/PrimOps.cmm | |
parent | 18087a119b47368b15231c43402c81888c75957d (diff) | |
download | haskell-95e6865ecf06b2bd80fa737e4fa4a24beaae25c5.tar.gz |
Fix bug in readMVar implementation: keep clean MVars clean.
The readMVar implementation had only partially implemented
a micro-optimization which allows us to avoid adding an MVar
to the mutable list if the MVar was not changed. However,
this was not applied to the release method on the fast path,
resulting in dirty MVars which were not added to the mutable list.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 648594b277..ced15eec99 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -1563,7 +1563,7 @@ stg_readMVarzh ( P_ mvar, /* :: MVar a */ ) val = StgMVar_value(mvar); - unlockClosure(mvar, stg_MVAR_DIRTY_info); + unlockClosure(mvar, info); return (val); } @@ -1579,7 +1579,7 @@ stg_tryReadMVarzh ( P_ mvar, /* :: MVar a */ ) val = StgMVar_value(mvar); - unlockClosure(mvar, stg_MVAR_DIRTY_info); + unlockClosure(mvar, info); return (1, val); } |