Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add callbacks for surf_exit.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 8 Feb 2014 22:35:03 +0000 (23:35 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 8 Feb 2014 22:35:03 +0000 (23:35 +0100)
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp

index efc5739..54becfa 100644 (file)
@@ -90,6 +90,8 @@ xbt_dynar_t surf_path = NULL;
 xbt_dynar_t host_that_restart = NULL;
 xbt_dict_t watched_hosts_lib;
 
+surf_callback(void, void) surfExitCallbacks;
+
 s_surf_model_description_t surf_plugin_description[] = {
                  {"Energy",
                   "Cpu energy consumption.",
@@ -443,6 +445,8 @@ void surf_exit(void)
   xbt_dynar_free(&model_list_invoke);
   routing_exit();
 
+  surf_callback_emit(surfExitCallbacks);
+
   if (maxmin_system) {
     lmm_system_free(maxmin_system);
     maxmin_system = NULL;
index 4381fa7..27774f3 100644 (file)
@@ -63,6 +63,8 @@ XBT_PUBLIC(double) surf_get_clock(void);
 extern double sg_sender_gap;
 XBT_PUBLIC(int)  SURF_CPU_LEVEL;    //Surf cpu level
 
+extern surf_callback(void, void) surfExitCallbacks;
+
 int __surf_is_absolute_file_path(const char *file_path);
 
 /***********