cvs commit: fptools/ghc/rts HeapStackCheck.h HeapStackCheck.hc PrimOps.hc
Mon, 9 Jul 2001 09:37:50 +0100
> Simon Marlow <firstname.lastname@example.org> wrote,
> > simonmar 2001/07/06 07:11:38 PDT
> > 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
> > 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.
> Hmm, this could explain a couple of weird bugs in HPL that I
> recently had...
I hope so! :)