diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-07 14:39:04 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-07 14:40:30 +0100 |
commit | 93e7e26245fbd173f6cea547cb008c7258d74442 (patch) | |
tree | efd3eeddd53811fabd17638201c623fb906cb342 /rts/Capability.h | |
parent | 22b51daaf41820e5451cb8dadf63e2a534c3efb4 (diff) | |
download | haskell-93e7e26245fbd173f6cea547cb008c7258d74442.tar.gz |
scheduleYield: avoid doing a GC again if we just did one
If we are interrupted to do a GC, then we do not immediately do another
one. This avoids a starvation situation where one Capability keeps
forcing a GC and the other Capabilities make no progress at all.
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index 1a2e7fd8bc..6c417160ad 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -257,7 +257,7 @@ EXTERN_INLINE void recordClosureMutated (Capability *cap, StgClosure *p); // On return: *pCap is NULL if the capability was released. The // current task should then re-acquire it using waitForCapability(). // -void yieldCapability (Capability** pCap, Task *task); +rtsBool yieldCapability (Capability** pCap, Task *task, rtsBool gcAllowed); // Acquires a capability for doing some work. // |