Browse Source

use a work around for the bug shown by sched_ctx

Terry Cojean 10 years ago
parent
commit
ed91ecb382
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/core/sched_ctx_list.c

+ 3 - 0
src/core/sched_ctx_list.c

@@ -369,7 +369,10 @@ struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_iterator_get_next(struct _s
 			}
 			else
 			{
+				/* if everything fails (e.g. worker removed from ctx since related has_next call)
+				   just return head, it'll save us a synchro */
 				it->cursor = NULL;
+				ret = it->list_head->head;
 			}
 		}
 		else