case SD_RUNNING:
task->state_set = sd_global->running_task_set;
task->start_time =
- surf_workstation_model->common_public->action_get_start_time(task->
+ surf_workstation_model->common_public.action_get_start_time(task->
surf_action);
break;
case SD_DONE:
task->state_set = sd_global->done_task_set;
task->finish_time =
- surf_workstation_model->common_public->action_get_finish_time(task->
+ surf_workstation_model->common_public.action_get_finish_time(task->
surf_action);
task->remains = 0;
break;
if (xbt_dynar_length(dst->tasks_before) == 0 && __SD_task_is_scheduled(dst))
__SD_task_set_state(dst, SD_READY);
- /* __SD_print_dependencies(src);
+ /* __SD_print_dependencies(src);
__SD_print_dependencies(dst); */
}
* SD_simulate() will stop as soon as the \ref e_SD_task_state_t "state" of this
* task becomes the one given in argument. The
* watch point is then automatically removed.
- *
+ *
* \param task a task
* \param state the \ref e_SD_task_state_t "state" you want to watch
* (cannot be #SD_NOT_SCHEDULED)
/**
* \brief Removes a watch point from a task
- *
+ *
* \param task a task
* \param state the \ref e_SD_task_state_t "state" you no longer want to watch
* \see SD_task_watch()
/**
* \brief Returns an approximative estimation of the execution time of a task.
- *
+ *
* The estimation is very approximative because the value returned is the time
* the task would take if it was executed now and if it was the only task.
- *
+ *
* \param task the task to evaluate
* \param workstation_nb number of workstations on which the task would be executed
* \param workstation_list the workstations on which the task would be executed
* The task state must be #SD_NOT_SCHEDULED.
* Once scheduled, a task will be executed as soon as possible in SD_simulate(),
* i.e. when its dependencies are satisfied.
- *
+ *
* \param task the task you want to schedule
* \param workstation_nb number of workstations on which the task will be executed
* \param workstation_list the workstations on which the task will be executed
__SD_task_destroy_scheduling_data(task);
if (__SD_task_is_running(task)) /* the task should become SD_FAILED */
- surf_workstation_model->common_public->action_cancel(task->surf_action);
+ surf_workstation_model->common_public.action_cancel(task->surf_action);
else
__SD_task_set_state(task, SD_NOT_SCHEDULED);
task->remains = task->amount;
xbt_free(surf_workstations);
}
- surf_workstation_model->common_public->action_set_data(task->surf_action,
+ surf_workstation_model->common_public.action_set_data(task->surf_action,
task);
DEBUG1("surf_action = %p", task->surf_action);
candidates = xbt_new(SD_task_t, 8);
__SD_task_set_state(task, SD_DONE);
- surf_workstation_model->common_public->action_free(task->surf_action);
+ surf_workstation_model->common_public.action_free(task->surf_action);
task->surf_action = NULL;
DEBUG0("Looking for candidates");
SD_CHECK_INIT_DONE();
xbt_assert0(task != NULL, "Invalid parameter");
if (task->surf_action)
- return surf_workstation_model->common_public->action_get_start_time(task->
+ return surf_workstation_model->common_public.action_get_start_time(task->
surf_action);
else
return task->start_time;
*
* The task state must be SD_RUNNING, SD_DONE or SD_FAILED.
* If the state is not completed yet, the returned value is an
- * estimation of the task finish time. This value can fluctuate
+ * estimation of the task finish time. This value can fluctuate
* until the task is completed.
*
* \param task: a task
xbt_assert0(task != NULL, "Invalid parameter");
if (task->surf_action) /* should never happen as actions are destroyed right after their completion */
- return surf_workstation_model->common_public->
+ return surf_workstation_model->common_public.
action_get_finish_time(task->surf_action);
else
return task->finish_time;
xbt_free(task->name);
if (task->surf_action != NULL)
- surf_workstation_model->common_public->action_free(task->surf_action);
+ surf_workstation_model->common_public.action_free(task->surf_action);
if (task->workstation_list != NULL)
xbt_free(task->workstation_list);