-
Simon Marlow authored
- change the type of StgRun(): now we return the Capability that the thread currently holds. The return status of the thread is now stored in cap->r.rRet (a new slot in the reg table). This was necessary because on return from StgRun(), the current TSO may be blocked, so it no longer belongs to us. If it is a bound thread, then the Task may have been already woken up on another Capability, so the scheduler can't use task->cap to find the capability it currently owns. - when shutting down, allow a bound thread to remove its TSO from the run queue when exiting (eliminates an error condition in releaseCapability()).
7c82b4a8