From: Arnaud Giersch Date: Sat, 8 Feb 2014 22:35:03 +0000 (+0100) Subject: Add callbacks for surf_exit. X-Git-Tag: v3_11_beta~66 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/35a8aaae6171de28791ddabcfc32a1a03f461062?ds=sidebyside Add callbacks for surf_exit. --- diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index efc5739cec..54becfa4f1 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -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; diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 4381fa70d3..27774f36b9 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -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); /***********