[project @ 2002-02-14 07:52:05 by sof]
Restructured / tidied a bit: * Capability.grabReturnCapability() is now called by resumeThread(). It takes care of waiting on the (Capability.c-local) condition variable, 'returning_worker_cond' (moved here from Schedule.c) * If a worker notices upon entry to the Scheduler that there are worker threads waiting to deposit results of external calls, it gives up its capability by calling Capability.yieldCapability(). * Added Scheduler.waitForWork(), which takes care of blocking on 'thread_ready_cond' (+ 'rts_n_waiting_tasks' book-keeping). Note: changes haven't been fully tested, due to HEAD instability.