Skip to content
Snippets Groups Projects
Commit 01d89b0d authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

be sure to handle implicit tasks correctly.

parent b7636553
No related branches found
No related tags found
1 merge request!343Subset sorting
...@@ -1251,6 +1251,10 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { ...@@ -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 this is an implicit task, just pretend it's done. */
if (t->implicit) { 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++) { for (int j = 0; j < t->nr_unlock_tasks; j++) {
struct task *t2 = t->unlock_tasks[j]; struct task *t2 = t->unlock_tasks[j];
if (atomic_dec(&t2->wait) == 1) scheduler_enqueue(s, t2); if (atomic_dec(&t2->wait) == 1) scheduler_enqueue(s, t2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment