[project @ 2002-01-22 13:54:22 by simonmar]
authorsimonmar <unknown>
Tue, 22 Jan 2002 13:54:23 +0000 (13:54 +0000)
committersimonmar <unknown>
Tue, 22 Jan 2002 13:54:23 +0000 (13:54 +0000)
commit33a7aa8bb2584a8e4cb8bdae27f6d56696f2dea5
tree98c4a4f901b7a37e1954e602c5e167a8b2557f67
parent483817dd051f011218c3c7041809ef019a7ebd0d
[project @ 2002-01-22 13:54:22 by simonmar]
Deadlock is now an exception instead of a return status from
rts_evalIO().

The current behaviour is as follows, and can be changed if necessary:
in the event of a deadlock, the top main thread is taken from the main
thread queue, and if it is blocked on an MVar or an Exception (for
throwTo), then it receives a Deadlock exception.  If it is blocked on
a BLACKHOLE, we instead send it the NonTermination exception.  Note
that only the main thread gets the exception: it is the responsibility
of the main thread to unblock other threads if necessary.

There's a slight difference in the SMP build: *all* the main threads
get an exception, because clearly none of them may make progress
(compared to the non-SMP situation, where all but the top main thread
are usually blocked).
ghc/compiler/compMan/CompManager.lhs
ghc/driver/PackageSrc.hs
ghc/includes/RtsAPI.h
ghc/lib/std/PrelIOBase.lhs
ghc/lib/std/PrelTopHandler.hs
ghc/rts/Main.c
ghc/rts/Prelude.h
ghc/rts/RtsAPI.c
ghc/rts/Schedule.c
ghc/rts/StgMiscClosures.hc