From 93e7e26245fbd173f6cea547cb008c7258d74442 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 7 Jun 2012 14:39:04 +0100 Subject: 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. --- rts/Capability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/Capability.h') 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. // -- cgit v1.2.1