|
|
@@ -151,7 +151,7 @@ static int _starpu_priority_push_task(struct starpu_task *task)
|
|
|
|
|
|
static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
|
|
|
{
|
|
|
- struct starpu_task *chosen_task = NULL, *task;
|
|
|
+ struct starpu_task *chosen_task = NULL, *task, *nexttask;
|
|
|
unsigned workerid = starpu_worker_get_id();
|
|
|
int skipped = 0;
|
|
|
|
|
|
@@ -183,9 +183,10 @@ static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
|
|
|
{
|
|
|
for (task = starpu_task_list_begin(&taskq->taskq[priolevel]);
|
|
|
task != starpu_task_list_end(&taskq->taskq[priolevel]);
|
|
|
- task = starpu_task_list_next(task))
|
|
|
+ task = nexttask)
|
|
|
{
|
|
|
unsigned nimpl;
|
|
|
+ nexttask = starpu_task_list_next(task);
|
|
|
for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
{
|
|
|
if (starpu_worker_can_execute_task(workerid, task, nimpl))
|