-
sof authored
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.
237ea701