summaryrefslogtreecommitdiff
path: root/rts/PrimOps.cmm
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2013-07-17 15:49:47 -0700
committerEdward Z. Yang <ezyang@mit.edu>2013-07-17 15:49:47 -0700
commit95e6865ecf06b2bd80fa737e4fa4a24beaae25c5 (patch)
treeffeffc1df6aa92f2b6404e954de520dddb895e35 /rts/PrimOps.cmm
parent18087a119b47368b15231c43402c81888c75957d (diff)
downloadhaskell-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.cmm4
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);
}