- double power_scale = 0.0;
- double power_initial = 0.0;
- tmgr_trace_t power_trace = NULL;
- e_surf_resource_state_t state_initial = SURF_RESOURCE_OFF;
- tmgr_trace_t state_trace = NULL;
-
- power_scale = get_cpu_power(A_surfxml_host_power);
- surf_parse_get_double(&power_initial, A_surfxml_host_availability);
- power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
-
- xbt_assert0((A_surfxml_host_state == A_surfxml_host_state_ON) ||
- (A_surfxml_host_state == A_surfxml_host_state_OFF),
- "Invalid state");
- if (A_surfxml_host_state == A_surfxml_host_state_ON)
- state_initial = SURF_RESOURCE_ON;
- if (A_surfxml_host_state == A_surfxml_host_state_OFF)
- state_initial = SURF_RESOURCE_OFF;
- state_trace = tmgr_trace_new(A_surfxml_host_state_file);
-
- current_property_set = xbt_dict_new();
- ptask_cpu_new(A_surfxml_host_id, power_scale, power_initial, power_trace,
- state_initial, state_trace, current_property_set);
-}
-
-static void ptask_cpu_create_resource(char *name, double power_peak,
- double power_scale,
- tmgr_trace_t power_trace,
- e_surf_resource_state_t state_initial,
- tmgr_trace_t state_trace,
- xbt_dict_t cpu_properties)
-{
- ptask_cpu_new(xbt_strdup(name),power_peak,power_scale,power_trace,
- state_initial,state_trace,cpu_properties);
-}
-
-static link_L07_t ptask_link_new(char *name,
- double bw_initial,
- tmgr_trace_t bw_trace,
- double lat_initial,
- tmgr_trace_t lat_trace,
- e_surf_resource_state_t
- state_initial,
- tmgr_trace_t state_trace,
- e_surf_link_sharing_policy_t
- policy, xbt_dict_t properties)
+ ptask_cpu_create_resource(
+ struct_host->V_host_id,
+ struct_host->V_host_power_peak,
+ struct_host->V_host_power_scale,
+ struct_host->V_host_power_trace,
+ struct_host->V_host_state_initial,
+ struct_host->V_host_state_trace,
+ current_property_set);
+ current_property_set=NULL;
+}
+
+static void* ptask_link_create_resource(char *name,
+ double bw_initial,
+ tmgr_trace_t bw_trace,
+ double lat_initial,
+ tmgr_trace_t lat_trace,
+ e_surf_resource_state_t
+ state_initial,
+ tmgr_trace_t state_trace,
+ e_surf_link_sharing_policy_t
+ policy, xbt_dict_t properties)