|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2009-2016 Université de Bordeaux
|
|
|
+ * Copyright (C) 2009-2017 Université de Bordeaux
|
|
|
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 CNRS
|
|
|
* Copyright (C) 2014, 2016 Inria
|
|
|
*
|
|
@@ -687,8 +687,6 @@ static void _starpu_data_unregister_fetch_data_callback(void *_arg)
|
|
|
static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned coherent, unsigned nowait)
|
|
|
{
|
|
|
STARPU_ASSERT(handle);
|
|
|
- /* Prevent any further unregistration */
|
|
|
- handle->magic = 0;
|
|
|
STARPU_ASSERT_MSG(handle->nchildren == 0, "data %p needs to be unpartitioned before unregistration", handle);
|
|
|
STARPU_ASSERT_MSG(handle->nplans == 0, "data %p needs its partition plans to be cleaned before unregistration", handle);
|
|
|
STARPU_ASSERT_MSG(handle->partitioned == 0, "data %p needs its partitioned plans to be unpartitioned before unregistration", handle);
|
|
@@ -798,6 +796,9 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /* Prevent any further unregistration */
|
|
|
+ handle->magic = 0;
|
|
|
+
|
|
|
_starpu_spin_lock(&handle->header_lock);
|
|
|
if (!coherent)
|
|
|
{
|