[project @ 2005-05-19 13:21:55 by simonmar]
authorsimonmar <unknown>
Thu, 19 May 2005 13:21:55 +0000 (13:21 +0000)
committersimonmar <unknown>
Thu, 19 May 2005 13:21:55 +0000 (13:21 +0000)
commit3595da95b2ca0d60c9100f77541b6ce36e49363c
treeb7fe80f44720c0daaaec2e4da8b1e3389dc26ac5
parenteab2c6c48c6d0d679e2a737388749ac482372110
[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.
ghc/includes/StgMiscClosures.h
ghc/rts/HeapStackCheck.cmm
ghc/rts/PrimOps.cmm
ghc/rts/Schedule.c
ghc/rts/Schedule.h
ghc/rts/StgStartup.cmm