Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Get surf_model_init set fields to common values about actions to kill dupplicated...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 1 Jul 2009 09:52:11 +0000 (09:52 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 1 Jul 2009 09:52:11 +0000 (09:52 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6419 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/cpu.c
src/surf/network.c
src/surf/network_constant.c
src/surf/network_gtnets.c
src/surf/surf_model.c
src/surf/surf_model_timer.c
src/surf/workstation.c
src/surf/workstation_ptask_L07.c

index a13c798..47de2a4 100644 (file)
@@ -399,9 +399,6 @@ static void surf_cpu_model_init_internal(void)
   running_action_set_that_does_not_need_being_checked =
     xbt_swag_new(xbt_swag_offset(action, state_hookup));
 
-  surf_cpu_model->action_get_state = surf_action_get_state;
-  surf_cpu_model->action_get_start_time = surf_action_get_start_time;
-  surf_cpu_model->action_get_finish_time = surf_action_get_finish_time;
   surf_cpu_model->action_free = action_free;
   surf_cpu_model->action_use = action_use;
   surf_cpu_model->action_cancel = action_cancel;
index 1f03ed3..97ce92d 100644 (file)
@@ -679,9 +679,6 @@ static void surf_network_model_init_internal(void)
 {
   surf_network_model = surf_model_init();
 
-  surf_network_model->action_get_state = surf_action_get_state;
-  surf_network_model->action_get_start_time = surf_action_get_start_time;
-  surf_network_model->action_get_finish_time = surf_action_get_finish_time;
   surf_network_model->action_free = action_free;
   surf_network_model->action_use = action_use;
   surf_network_model->action_cancel = action_cancel;
index f04861b..979b30a 100644 (file)
@@ -279,9 +279,6 @@ static void surf_network_model_init_internal(void)
 {
   surf_network_model = surf_model_init();
 
-  surf_network_model->action_get_state = surf_action_get_state;
-  surf_network_model->action_get_start_time = surf_action_get_start_time;
-  surf_network_model->action_get_finish_time = surf_action_get_finish_time;
   surf_network_model->action_free = action_free;
   surf_network_model->action_use = action_use;
   surf_network_model->action_cancel = action_cancel;
index 21f23c7..fb2c303 100644 (file)
@@ -531,7 +531,6 @@ static void surf_network_model_init_internal(void)
 
   surf_model_init(surf_network_model);
 
-  surf_network_model->common_public.action_get_state = surf_action_get_state;
   surf_network_model->common_public.action_use = action_use;
   surf_network_model->common_public.action_free = action_free;
   surf_network_model->common_public.action_cancel = action_cancel;
index 02104c2..a90c213 100644 (file)
@@ -39,6 +39,10 @@ surf_model_t surf_model_init(void)
   model->action_cancel = void_die_impossible_paction;
   model->action_recycle = void_die_impossible_paction;
 
+  model->action_get_state = surf_action_get_state;
+  model->action_get_start_time = surf_action_get_start_time;
+  model->action_get_finish_time = surf_action_get_finish_time;
+
   return model;
 }
 /** @brief finalize common datastructures to all models */
index 5a3a740..707b400 100644 (file)
@@ -159,7 +159,6 @@ static void surf_timer_model_init_internal(void)
 {
   surf_timer_model = surf_model_init();
 
-  surf_timer_model->action_get_state = surf_action_get_state;
   surf_timer_model->action_change_state = action_change_state;
   surf_timer_model->action_set_data = surf_action_set_data;
   surf_timer_model->name = "TIMER";
index 4a33095..c2a1781 100644 (file)
@@ -290,10 +290,6 @@ static void surf_workstation_model_init_internal(void)
   surf_workstation_model = surf_model_init();
 /*   surf_workstation_model->extension_private = xbt_new0(s_surf_workstation_model_extension_private_t,1); */
 
-  surf_workstation_model->action_get_state = surf_action_get_state;
-  surf_workstation_model->action_get_start_time = surf_action_get_start_time;
-  surf_workstation_model->action_get_finish_time =
-    surf_action_get_finish_time;
   surf_workstation_model->action_free = action_free;
   surf_workstation_model->action_use = action_use;
   surf_workstation_model->action_cancel = action_cancel;
index ea27318..cddab82 100644 (file)
@@ -985,10 +985,6 @@ static void model_init_internal(void)
 {
   surf_workstation_model = surf_model_init();
 
-  surf_workstation_model->action_get_state = surf_action_get_state;
-  surf_workstation_model->action_get_start_time = surf_action_get_start_time;
-  surf_workstation_model->action_get_finish_time =
-    surf_action_get_finish_time;
   surf_workstation_model->action_use = action_use;
   surf_workstation_model->action_free = action_free;
   surf_workstation_model->action_cancel = action_cancel;