|
@@ -1,6 +1,6 @@
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
*
|
|
*
|
|
- * Copyright (C) 2009-2012 Université de Bordeaux 1
|
|
|
|
|
|
+ * Copyright (C) 2009-2013 Université de Bordeaux 1
|
|
* Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
|
|
* Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
|
|
*
|
|
*
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
@@ -297,8 +297,9 @@ int starpu_data_acquire_on_node(starpu_data_handle_t handle, unsigned node, enum
|
|
while (!wrapper.finished)
|
|
while (!wrapper.finished)
|
|
_STARPU_PTHREAD_COND_WAIT(&wrapper.cond, &wrapper.lock);
|
|
_STARPU_PTHREAD_COND_WAIT(&wrapper.cond, &wrapper.lock);
|
|
_STARPU_PTHREAD_MUTEX_UNLOCK(&wrapper.lock);
|
|
_STARPU_PTHREAD_MUTEX_UNLOCK(&wrapper.lock);
|
|
- _STARPU_PTHREAD_MUTEX_DESTROY(&wrapper.lock);
|
|
|
|
}
|
|
}
|
|
|
|
+ _STARPU_PTHREAD_COND_DESTROY(&wrapper.cond);
|
|
|
|
+ _STARPU_PTHREAD_MUTEX_DESTROY(&wrapper.lock);
|
|
|
|
|
|
/* At that moment, the caller holds a reference to the piece of data.
|
|
/* At that moment, the caller holds a reference to the piece of data.
|
|
* We enqueue the "post" sync task in the list associated to the handle
|
|
* We enqueue the "post" sync task in the list associated to the handle
|
|
@@ -381,6 +382,8 @@ int _starpu_prefetch_data_on_node_with_mode(starpu_data_handle_t handle, unsigne
|
|
/* we can immediately proceed */
|
|
/* we can immediately proceed */
|
|
struct _starpu_data_replicate *replicate = &handle->per_node[node];
|
|
struct _starpu_data_replicate *replicate = &handle->per_node[node];
|
|
|
|
|
|
|
|
+ _STARPU_PTHREAD_COND_DESTROY(&wrapper->cond);
|
|
|
|
+ _STARPU_PTHREAD_MUTEX_DESTROY(&wrapper->lock);
|
|
free(wrapper);
|
|
free(wrapper);
|
|
|
|
|
|
_starpu_fetch_data_on_node(handle, replicate, mode, async, async, NULL, NULL);
|
|
_starpu_fetch_data_on_node(handle, replicate, mode, async, async, NULL, NULL);
|
|
@@ -410,6 +413,8 @@ int _starpu_prefetch_data_on_node_with_mode(starpu_data_handle_t handle, unsigne
|
|
while (!wrapper->finished)
|
|
while (!wrapper->finished)
|
|
_STARPU_PTHREAD_COND_WAIT(&wrapper->cond, &wrapper->lock);
|
|
_STARPU_PTHREAD_COND_WAIT(&wrapper->cond, &wrapper->lock);
|
|
_STARPU_PTHREAD_MUTEX_UNLOCK(&wrapper->lock);
|
|
_STARPU_PTHREAD_MUTEX_UNLOCK(&wrapper->lock);
|
|
|
|
+ _STARPU_PTHREAD_COND_DESTROY(&wrapper->cond);
|
|
|
|
+ _STARPU_PTHREAD_MUTEX_DESTROY(&wrapper->lock);
|
|
free(wrapper);
|
|
free(wrapper);
|
|
}
|
|
}
|
|
|
|
|