[project @ 2002-02-18 13:26:12 by sof]
authorsof <unknown>
Mon, 18 Feb 2002 13:26:13 +0000 (13:26 +0000)
committersof <unknown>
Mon, 18 Feb 2002 13:26:13 +0000 (13:26 +0000)
commit6e2ea06c4a72866396f1b754ec8c2091a9b1e20b
tree5067095ab9e748e32659831b5c2c22bd9088874d
parent45ddebc0dc20f013eff011a157b42acb37ea7598
[project @ 2002-02-18 13:26:12 by sof]
Be clear about the lock assumptions of GarbageCollect(); it
is now required to hold sched_mutex.

The real reason for adding this requirement is so that when
prior to scheduling finalizers and doing thread resurrection,
GarbageCollect() may set the lock status of sched_mutex to
the state expected by scheduleFinalizers() and resurrectThreads()
(i.e., unlocked).

Note: this is only an issue with pthreads. In the Win32 threading
model, it's a NOP for a thread to grab a mutex it already holds.
ghc/rts/GC.c
ghc/rts/Schedule.c
ghc/rts/Weak.c