[project @ 2005-05-19 13:21:55 by simonmar]
- Move the call to threadPaused() from the scheduler into STG land,
and put it in a new code fragment (stg_returnToSched) that we pass
through every time we return from STG to the scheduler. Also, the
SAVE_THREAD_STATE() is now in stg_returnToSched which might save a
little code space (at the expense of an extra jump for every return
to the scheduler).
- SMP: when blocking on an MVar, we now wait until the thread has been
made fully safe and placed on the blocked queue of the MVar before
we unlock the MVar. This closes a race whereby another OS thread could
begin waking us up before the current TSO had been properly tidied up.
Fixes one cause of crashes when using MVars with SMP. I still have a
deadlock problem to track down.