소스 검색

we must not set the is_submitted flag until we are sure nobody is going to
submit the task by mistake.

Cédric Augonnet 16 년 전
부모
커밋
69c17771ce
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/core/jobs.c

+ 5 - 2
src/core/jobs.c

@@ -166,14 +166,17 @@ int starpu_submit_task(struct starpu_task *task)
 	/* enfore task dependencies */
 	if (task->use_tag)
 	{
-		j->tag->is_submitted = 1;
-
 		if (submit_job_enforce_task_deps(j))
 		{
+			j->tag->is_submitted = 1;
+
 			if (is_sync)
 				block_sync_task(j);
 			return 0;
 		}
+		
+		j->tag->is_submitted = 1;
+
 	}
 
 #ifdef NO_DATA_RW_LOCK