Ver código fonte

in unpartition, unlock all child header locks before clearing implicit deps, which take the implicit dep mutex. Fixes lock acquisition order

Samuel Thibault 10 anos atrás
pai
commit
538d1aa9d7
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/datawizard/filters.c

+ 4 - 1
src/datawizard/filters.c

@@ -492,9 +492,12 @@ void starpu_data_unpartition(starpu_data_handle_t root_handle, unsigned gatherin
 		_starpu_data_free_interfaces(child_handle);
 		_starpu_spin_unlock(&child_handle->header_lock);
 		_starpu_spin_destroy(&child_handle->header_lock);
+	}
 
+	for (child = 0; child < root_handle->nchildren; child++)
+	{
+		starpu_data_handle_t child_handle = starpu_data_get_child(root_handle, child);
 		_starpu_data_clear_implicit(child_handle);
-
 		STARPU_PTHREAD_MUTEX_DESTROY(&child_handle->busy_mutex);
 		STARPU_PTHREAD_COND_DESTROY(&child_handle->busy_cond);
 		STARPU_PTHREAD_MUTEX_DESTROY(&child_handle->sequential_consistency_mutex);