[project @ 2002-06-19 20:45:14 by sof]
authorsof <unknown>
Wed, 19 Jun 2002 20:45:17 +0000 (20:45 +0000)
committersof <unknown>
Wed, 19 Jun 2002 20:45:17 +0000 (20:45 +0000)
commit237ea701cf9634e88befa5f94252c916470473e3
tree9bedec8ed0600c4f25b8e6685c0c285cf9bdd379
parentfe1fb2f22e411672ea67df8344b7fed15ef2ac5b
[project @ 2002-06-19 20:45:14 by sof]
When handling external call-ins (via the RTS API) in
the multi-threaded case, add the StgMainThread that
the external thread is going to block waiting on
to the main_threads list prior to scheduling the new
worker thread.

Do this by having the scheduler provide a new entry
point, scheduleWaitThread().

Fixes a bug/race condition spotted by Wolfgang Thaller
(see scheduleWaitThread() comment) + enables a little
tidier interface between RtsAPI and Schedule.
ghc/includes/SchedAPI.h
ghc/rts/RtsAPI.c
ghc/rts/Schedule.c
ghc/rts/Schedule.h