Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
surfxml: better error checking, and less include of internal headers
[simgrid.git] / src / surf / surf_interface.cpp
index ed60663..a2624dd 100644 (file)
@@ -31,7 +31,7 @@ xbt_dynar_t model_list_invoke = NULL;  /* to invoke callbacks */
 
 simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
 xbt_dynar_t surf_path = NULL;
-xbt_dynar_t host_that_restart = NULL;
+xbt_dynar_t host_that_restart = xbt_dynar_new(sizeof(char*), NULL);
 xbt_dict_t watched_hosts_lib;
 
 namespace simgrid {
@@ -378,8 +378,7 @@ void surf_exit(void)
 #endif
 
   tmgr_finalize();
-  surf_parse_lex_destroy();
-  surf_parse_free_callbacks();
+  sg_platf_exit();
 
   NOW = 0;                      /* Just in case the user plans to restart the simulation afterward */
 }
@@ -412,18 +411,18 @@ Model::~Model(){
   delete p_doneActionSet;
 }
 
-double Model::shareResources(double now)
+double Model::next_occuring_event(double now)
 {
   //FIXME: set the good function once and for all
   if (p_updateMechanism == UM_LAZY)
-    return shareResourcesLazy(now);
+    return next_occuring_event_lazy(now);
   else if (p_updateMechanism == UM_FULL)
-    return shareResourcesFull(now);
+    return next_occuring_event_full(now);
   else
     xbt_die("Invalid cpu update mechanism!");
 }
 
-double Model::shareResourcesLazy(double now)
+double Model::next_occuring_event_lazy(double now)
 {
   Action *action = NULL;
   double min = -1;
@@ -500,7 +499,7 @@ double Model::shareResourcesLazy(double now)
   return min;
 }
 
-double Model::shareResourcesFull(double /*now*/) {
+double Model::next_occuring_event_full(double /*now*/) {
   THROW_UNIMPLEMENTED;
 }