From 35a8aaae6171de28791ddabcfc32a1a03f461062 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 8 Feb 2014 23:35:03 +0100 Subject: [PATCH 1/1] Add callbacks for surf_exit. --- src/surf/surf_interface.cpp | 4 ++++ src/surf/surf_interface.hpp | 2 ++ 2 files changed, 6 insertions(+) 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); /*********** -- 2.20.1