rts/Capability: A few documentation comments
authorBen Gamari <ben@well-typed.com>
Tue, 5 Feb 2019 15:43:56 +0000 (10:43 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 18 Oct 2019 19:26:53 +0000 (15:26 -0400)
rts/Capability.c

index 33a9439..8b552e0 100644 (file)
@@ -748,6 +748,8 @@ static Capability * waitForReturnCapability (Task *task)
  * result of the external call back to the Haskell thread that
  * made it.
  *
+ * pCap is strictly an output.
+ *
  * ------------------------------------------------------------------------- */
 
 void waitForCapability (Capability **pCap, Task *task)
@@ -840,6 +842,9 @@ void waitForCapability (Capability **pCap, Task *task)
  *      SYNC_GC_PAR), either to do a sequential GC, forkProcess, or
  *      setNumCapabilities.  We should give up the Capability temporarily.
  *
+ * When yieldCapability returns *pCap will have been updated to the new
+ * capability held by the caller.
+ *
  * ------------------------------------------------------------------------- */
 
 #if defined(THREADED_RTS)