Move the arenaemergency test up to policypollagain.

Copied from Perforce
 Change: 188217
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2015-09-03 15:39:39 +01:00
parent ef62affc6d
commit 851e35bcff
2 changed files with 2 additions and 3 deletions

View file

@ -333,7 +333,7 @@ Bool PolicyPollAgain(Arena arena, Clock start, Work tracedWork)
AVER(nextPollThreshold > globals->pollThreshold);
globals->pollThreshold = nextPollThreshold;
return PolicyPoll(arena);
return ArenaEmergency(arena) || PolicyPoll(arena);
}

View file

@ -1871,8 +1871,7 @@ Work TracePoll(Globals globals)
endWork = oldWork + trace->quantumWork;
do {
TraceAdvance(trace);
} while (trace->state != TraceFINISHED
&& (ArenaEmergency(arena) || traceWork(trace) < endWork));
} while (trace->state != TraceFINISHED && traceWork(trace) < endWork);
newWork = traceWork(trace);
AVER(newWork >= oldWork);
work = newWork - oldWork;