cvs commit: fptools/ghc/rts HeapStackCheck.h HeapStackCheck.hc PrimOps.hc
Simon Marlow
simonmar@microsoft.com
Mon, 9 Jul 2001 09:37:50 +0100
> Simon Marlow <simonmar@glass.cse.ogi.edu> wrote,
>=20
> > simonmar 2001/07/06 07:11:38 PDT
> >=20
> > Modified files:
> > ghc/rts HeapStackCheck.h HeapStackCheck.hc=20
> > PrimOps.hc=20
> > Log:
> > Fix a couple of nasty bugs in the take/putMVar implementation.
> > =20
> > Now we keep the invariant that a full MVar only has=20
> blocked putMVars
> > on its queue, and an empty MVar only has blocked takeMVars on its
> > queue. It was the absence of this invariant that led to=20
> accidental
> > deadlock before.
> > =20
> > The second bug is that there was a window between a blocked thread
> > being restarted and it actually retrying the takeMVar/putMVar
> > operation when it could receive an exception, which would=20
> also lead to
> > deadlock.
>=20
> Hmm, this could explain a couple of weird bugs in HPL that I
> recently had...
I hope so! :)
Simon