[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.
Showing with 79 additions and 56 deletions