Browse Source

Move _starpu_data_set_unregister_hook to where the hook is called

Samuel Thibault 7 years ago
parent
commit
b250e277f9
2 changed files with 6 additions and 6 deletions
  1. 1 6
      src/datawizard/coherency.c
  2. 5 0
      src/datawizard/interfaces/data_interface.c

+ 1 - 6
src/datawizard/coherency.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2014,2017                           Inria
- * Copyright (C) 2008-2017                                Université de Bordeaux
+ * Copyright (C) 2008-2018                                Université de Bordeaux
  * Copyright (C) 2010-2018                                CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -1374,8 +1374,3 @@ unsigned _starpu_is_data_present_or_requested(starpu_data_handle_t handle, unsig
 
 	return ret;
 }
-
-void _starpu_data_set_unregister_hook(starpu_data_handle_t handle, _starpu_data_handle_unregister_hook func)
-{
-	handle->unregister_hook = func;
-}

+ 5 - 0
src/datawizard/interfaces/data_interface.c

@@ -702,6 +702,11 @@ static void _starpu_data_unregister_fetch_data_callback(void *_arg)
 	STARPU_PTHREAD_MUTEX_UNLOCK(&arg->mutex);
 }
 
+void _starpu_data_set_unregister_hook(starpu_data_handle_t handle, _starpu_data_handle_unregister_hook func)
+{
+	handle->unregister_hook = func;
+}
+
 /* Unregister the data handle, perhaps we don't need to update the home_node
  * (in that case coherent is set to 0)
  * nowait is for internal use when we already know for sure that we won't have to wait.