From 01d89b0d8721bcd6bd127d62ed3f4b2eef405acc Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <gonnet@google.com> Date: Wed, 24 May 2017 23:17:30 +0200 Subject: [PATCH] be sure to handle implicit tasks correctly. --- src/scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scheduler.c b/src/scheduler.c index 62395a1b87..fe8776e4fb 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1251,6 +1251,10 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { /* If this is an implicit task, just pretend it's done. */ if (t->implicit) { +#ifdef SWIFT_DEBUG_CHECKS + t->ti_run = s->space->e->ti_current; +#endif + t->skip = 1; for (int j = 0; j < t->nr_unlock_tasks; j++) { struct task *t2 = t->unlock_tasks[j]; if (atomic_dec(&t2->wait) == 1) scheduler_enqueue(s, t2); -- GitLab