[project @ 2003-12-16 13:27:31 by simonmar]
authorsimonmar <unknown>
Tue, 16 Dec 2003 13:27:32 +0000 (13:27 +0000)
committersimonmar <unknown>
Tue, 16 Dec 2003 13:27:32 +0000 (13:27 +0000)
commitde02e02a50bfe799a7ac4bf55e088999be0b95d8
tree64201f50fb14527e976adf957e0c34ff5681a358
parent4ff7d0b15769c360b3f54e857a6880edbcd46d26
[project @ 2003-12-16 13:27:31 by simonmar]
Clean up Capability API
~~~~~~~~~~~~~~~~~~~~~~~

- yieldToReturningWorker() is now yieldCapability(), and performs all
  kinds of yielding (both to returning workers and passing to other
  OS threads).  yieldCapabiltiy() does *not* re-acquire a capability.

- waitForWorkCapabilty() is now waitForCapability().

- releaseCapbility() also releases the capability when passing to
  another OS thread.  It is the only way to release a capability (apart
  from yieldCapability(), which calls releaseCapability() internally).

- passCapability() and passCapabilityToWorker() now do not release the
  capability.  They just set a flag to indicate where the capabiliy
  should go when it it next released.

Other cleanups:

  - Removed all the SMP stuff from Schedule.c.  It had extensive bitrot,
    and was just obfuscating the code.  If it is ever needed again,
    it can be resurrected from CVS.

  - Removed some other dead code in Schedule.c, in an attempt to make
    this file more manageable.
ghc/rts/Capability.c
ghc/rts/Capability.h
ghc/rts/Schedule.c