Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not require doxygen in maintainer mode
[simgrid.git] / src / surf / surf_timer.c
index 297bff6..d61560c 100644 (file)
@@ -59,13 +59,13 @@ static void *name_service(const char *name)
   return NULL;
 }
 
-static const char *get_model_name(void *model_id)
+static const char *get_resource_name(void *resource_id)
 {
   DIE_IMPOSSIBLE;
   return "";
 }
 
-static int model_used(void *model_id)
+static int resource_used(void *resource_id)
 {
   return 1;
 }
@@ -95,7 +95,7 @@ static void action_change_state(surf_action_t action,
   return;
 }
 
-static double share_models(double now)
+static double share_resources(double now)
 {
   if (xbt_heap_size(timer_heap))
     return (xbt_heap_maxkey(timer_heap));
@@ -113,9 +113,9 @@ static void update_actions_state(double now, double delta)
   return;
 }
 
-static void update_model_state(void *id,
+static void update_resource_state(void *id,
                                  tmgr_trace_event_t event_type,
-                                 double value)
+                                 double value, double date)
 {
   command_t command = id;
 
@@ -218,8 +218,8 @@ static void surf_timer_model_init_internal(void)
       xbt_swag_new(xbt_swag_offset(action, state_hookup));
 
   surf_timer_model->common_public->name_service = name_service;
-  surf_timer_model->common_public->get_model_name =
-      get_model_name;
+  surf_timer_model->common_public->get_resource_name =
+      get_resource_name;
   surf_timer_model->common_public->action_get_state =
       surf_action_get_state;
   surf_timer_model->common_public->action_free = action_free;
@@ -231,12 +231,12 @@ static void surf_timer_model_init_internal(void)
       surf_action_set_data;
   surf_timer_model->common_public->name = "TIMER";
 
-  surf_timer_model->common_private->model_used = model_used;
-  surf_timer_model->common_private->share_models = share_models;
+  surf_timer_model->common_private->resource_used = resource_used;
+  surf_timer_model->common_private->share_resources = share_resources;
   surf_timer_model->common_private->update_actions_state =
       update_actions_state;
-  surf_timer_model->common_private->update_model_state =
-      update_model_state;
+  surf_timer_model->common_private->update_resource_state =
+      update_resource_state;
   surf_timer_model->common_private->finalize = finalize;
 
   surf_timer_model->common_public->suspend = action_suspend;
@@ -256,8 +256,6 @@ static void surf_timer_model_init_internal(void)
 
   empty_trace = tmgr_empty_trace_new();
   timer_heap = xbt_heap_new(8, NULL);
-
-  xbt_assert0(maxmin_system, "surf_init has to be called first!");
 }
 
 void surf_timer_model_init(const char *filename)