浏览代码

It does not make sense to test for sequential_consistency flag when unlocking the post_sync_tasks: we are at execution time, not submission time. post_sync_tasks_cnt tells us whether post_sync tasks have been submitted or not anyway

Samuel Thibault 12 年之前
父节点
当前提交
12aa69aa32
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      src/core/dependencies/implicit_data_deps.c

+ 1 - 7
src/core/dependencies/implicit_data_deps.c

@@ -481,12 +481,8 @@ void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle)
 	struct _starpu_task_wrapper_list *post_sync_tasks = NULL;
 	unsigned do_submit_tasks = 0;
 
-	STARPU_PTHREAD_MUTEX_LOCK(&handle->sequential_consistency_mutex);
-
-	if (handle->sequential_consistency)
+	if (handle->post_sync_tasks_cnt > 0)
 	{
-		STARPU_ASSERT(handle->post_sync_tasks_cnt > 0);
-
 		if (--handle->post_sync_tasks_cnt == 0)
 		{
 			/* unlock all tasks : we need not hold the lock while unlocking all these tasks */
@@ -496,8 +492,6 @@ void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle)
 		}
 	}
 
-	STARPU_PTHREAD_MUTEX_UNLOCK(&handle->sequential_consistency_mutex);
-
 	if (do_submit_tasks)
 	{
 		struct _starpu_task_wrapper_list *link = post_sync_tasks;