Now that update_resource_state also takes care of failed actions, it
is mendatory to get correct informations about action's finish time.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5445
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double date)
if(surf_action_get_state(action)==SURF_ACTION_RUNNING ||
surf_action_get_state(action)==SURF_ACTION_READY) {
if(surf_action_get_state(action)==SURF_ACTION_RUNNING ||
surf_action_get_state(action)==SURF_ACTION_READY) {
- action->finish = surf_get_clock(); // BUG! Wrong value here
action_change_state( action, SURF_ACTION_FAILED);
}
}
action_change_state( action, SURF_ACTION_FAILED);
}
}
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double date)
{
link_CM02_t nw_link = id;
/* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
{
link_CM02_t nw_link = id;
/* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double time)
&value,
(void **) &model_obj))) {
model_obj->model->common_private->
&value,
(void **) &model_obj))) {
model_obj->model->common_private->
- update_resource_state(model_obj, event, value);
+ update_resource_state(model_obj, event, value,NOW);
}
}
xbt_dynar_foreach(model_list, iter, model) {
}
}
xbt_dynar_foreach(model_list, iter, model) {
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
model_obj->model->common_private->
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
model_obj->model->common_private->
- update_resource_state(model_obj, event, value);
+ update_resource_state(model_obj, event, value,NOW+min);
/* Update the actions' state */
void (*update_actions_state) (double now, double delta);
void (*update_resource_state) (void *id, tmgr_trace_event_t event_type,
/* Update the actions' state */
void (*update_actions_state) (double now, double delta);
void (*update_resource_state) (void *id, tmgr_trace_event_t event_type,
+ double value, double time);
void (*finalize) (void);
} s_surf_model_private_t;
void (*finalize) (void);
} s_surf_model_private_t;
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double date)
{
command_t command = id;
{
command_t command = id;
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double date)
{
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
}
{
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
}
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
+ double value, double date)
{
cpu_L07_t cpu = id;
link_L07_t nw_link = id;
{
cpu_L07_t cpu = id;
link_L07_t nw_link = id;