Implement atomicReadMVar, fixing #4001.

Authored by ezyang on Jul 8 2013, 1:03 PM.

Description

Implement atomicReadMVar, fixing Trac #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@mit.edu>

Details

Committed
ezyangJul 9 2013, 1:29 PM
Pushed
bgamariAug 25 2016, 1:39 PM
Parents
rGHCDIFFca9a43140175: Merge branch 'master' of http://darcs.haskell.org/ghc
Branches
Unknown
Tags
Unknown