* [PATCH] runqueue: Fix handling of zero priority task
@ 2014-04-13 10:44 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-04-13 10:44 UTC (permalink / raw)
To: bitbake-devel
The zero priority task should be run first but was being confused with
the None value the priority field defaulted to. Check for None
explicitly to avoid this error.
In the real world this doesn't change much but it confused the debug
output from the schedulers.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6372b65..274ccf2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -139,7 +139,7 @@ class RunQueueScheduler(object):
bestprio = None
for taskid in self.buildable:
prio = self.rev_prio_map[taskid]
- if not bestprio or bestprio > prio:
+ if bestprio is None or bestprio > prio:
stamp = self.stamps[taskid]
if stamp in self.rq.build_stamps.itervalues():
continue
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-13 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 10:44 [PATCH] runqueue: Fix handling of zero priority task Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.