Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'hypervisor' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid into hypervisor
[simgrid.git] / src / surf / new_model.c
index 2db0dad..dce13e2 100644 (file)
@@ -29,13 +29,6 @@ static xbt_swag_t
 #define GENERIC_ACTION(action) GENERIC_LMM_ACTION(action).generic_action
 
 static void new_model_action_state_set(surf_action_t action, e_surf_action_state_t state);
-static surf_action_t new_model_action_execute ();
-
-static surf_action_t new_model_action_fct()
-{
-  surf_action_t action = new_model_action_execute();
-  return action;
-}
 
 static surf_action_t new_model_action_execute ()
 {
@@ -43,31 +36,37 @@ static surf_action_t new_model_action_execute ()
   return NULL;
 }
 
+static surf_action_t new_model_action_fct()
+{
+  surf_action_t action = new_model_action_execute();
+  return action;
+}
+
 static void* new_model_create_resource(const char* id, const char* model,const char* type_id,const char* content_name)
 {
   THROW_UNIMPLEMENTED;
   return NULL;
 }
 
-static void new_model_finalize(void)
+static void new_model_finalize(surf_model_t new_model)
 {
   lmm_system_free(new_model_maxmin_system);
   new_model_maxmin_system = NULL;
 
-  surf_model_exit(surf_new_model);
-  surf_new_model = NULL;
+  surf_model_exit(new_model);
+  new_model = NULL;
 
   xbt_swag_free
       (new_model_running_action_set_that_does_not_need_being_checked);
   new_model_running_action_set_that_does_not_need_being_checked = NULL;
 }
 
-static void new_model_update_actions_state(double now, double delta)
+static void new_model_update_actions_state(surf_model_t new_model, double now, double delta)
 {
   return;
 }
 
-static double new_model_share_resources(double NOW)
+static double new_model_share_resources(surf_model_t new_model, double NOW)
 {
   return -1;
 }
@@ -149,6 +148,7 @@ static void surf_new_model_init_internal(void)
       xbt_swag_new(xbt_swag_offset(action, state_hookup));
 
   surf_new_model->name = "New Model";
+  surf_new_model->type = SURF_MODEL_TYPE_NEW_MODEL;
   surf_new_model->action_unref = new_model_action_unref;
   surf_new_model->action_cancel = new_model_action_cancel;
   surf_new_model->action_state_set = new_model_action_state_set;