Browse Source

Fix replicate reference counting

Samuel Thibault 13 years ago
parent
commit
b9f24287b1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/datawizard/user_interactions.c

+ 2 - 0
src/datawizard/user_interactions.c

@@ -336,6 +336,8 @@ int _starpu_prefetch_data_on_node_with_mode(starpu_data_handle handle, unsigned
 		if (!async)
 		{
 			_starpu_spin_lock(&handle->header_lock);
+			replicate->refcnt--;
+			STARPU_ASSERT(replicate->refcnt >= 0);
 			_starpu_notify_data_dependencies(handle);
 			_starpu_spin_unlock(&handle->header_lock);
 		}