- * #SD_NOT_SCHEDULED, #SD_SCHEDULED, #SD_READY, #SD_RUNNING, #SD_DONE or #SD_FAILED
+ * #SD_NOT_SCHEDULED, #SD_SCHEDULED, #SD_RUNNABLE, #SD_RUNNING, #SD_DONE or #SD_FAILED
statename=bprintf("%s %s %s %s %s %s %s",
(task->state&SD_NOT_SCHEDULED?"not scheduled":""),
(task->state&SD_SCHEDULED?"scheduled":""),
statename=bprintf("%s %s %s %s %s %s %s",
(task->state&SD_NOT_SCHEDULED?"not scheduled":""),
(task->state&SD_SCHEDULED?"scheduled":""),
(task->state&SD_IN_FIFO?"in fifo":""),
(task->state&SD_RUNNING?"running":""),
(task->state&SD_DONE?"done":""),
(task->state&SD_IN_FIFO?"in fifo":""),
(task->state&SD_RUNNING?"running":""),
(task->state&SD_DONE?"done":""),
* \brief Adds a dependency between two tasks
*
* \a dst will depend on \a src, ie \a dst will not start before \a src is finished.
* \brief Adds a dependency between two tasks
*
* \a dst will depend on \a src, ie \a dst will not start before \a src is finished.
*
* \param name the name of the new dependency (can be \c NULL)
* \param data the user data you want to associate with this dependency (can be \c NULL)
*
* \param name the name of the new dependency (can be \c NULL)
* \param data the user data you want to associate with this dependency (can be \c NULL)
SD_task_get_name(dst));
DEBUG2("SD_task_dependency_add: src = %s, dst = %s", SD_task_get_name(src),
SD_task_get_name(dst));
DEBUG2("SD_task_dependency_add: src = %s, dst = %s", SD_task_get_name(src),
- if (__SD_task_is_ready(dst)) {
- DEBUG1("SD_task_dependency_add: %s was ready and becomes scheduled!",
+ if (__SD_task_is_runnable(dst)) {
+ DEBUG1("SD_task_dependency_add: %s was runnable and becomes scheduled!",
SD_task_get_name(dst), SD_task_get_name(src),
SD_task_get_name(src), SD_task_get_name(dst));
SD_task_get_name(dst), SD_task_get_name(src),
SD_task_get_name(src), SD_task_get_name(dst));
- { SD_SCHEDULED, SD_RUNNING, SD_READY, SD_DONE, SD_FAILED };
+ { SD_SCHEDULED, SD_RUNNING, SD_RUNNABLE, SD_DONE, SD_FAILED };
- { "scheduled", "running", "ready", "done", "failed" };
+ { "scheduled", "running", "runnable", "done", "failed" };
* If you call this function, the task state becomes #SD_NOT_SCHEDULED.
* Call SD_task_schedule() to schedule it again.
*
* If you call this function, the task state becomes #SD_NOT_SCHEDULED.
* Call SD_task_schedule() to schedule it again.
*
xbt_assert0(task != NULL, "Invalid parameter");
if (task->state_set != sd_global->scheduled_task_set &&
xbt_assert0(task != NULL, "Invalid parameter");
if (task->state_set != sd_global->scheduled_task_set &&
- "Task %s: the state must be SD_SCHEDULED, SD_READY, SD_RUNNING or SD_FAILED",
+ "Task %s: the state must be SD_SCHEDULED, SD_RUNNABLE, SD_RUNNING or SD_FAILED",
&& task->kind == SD_TASK_NOT_TYPED) /* Don't free scheduling data for typed tasks */
__SD_task_destroy_scheduling_data(task);
&& task->kind == SD_TASK_NOT_TYPED) /* Don't free scheduling data for typed tasks */
__SD_task_destroy_scheduling_data(task);
- xbt_assert2(__SD_task_is_ready_or_in_fifo(task),
- "Task '%s' is not ready or in a fifo! Task state: %d",
+ xbt_assert2(__SD_task_is_runnable_or_in_fifo(task),
+ "Task '%s' is not runnable or in a fifo! Task state: %d",
SD_task_get_name(task), SD_task_get_state(task));
xbt_assert1(task->workstation_list != NULL,
"Task '%s': workstation_list is NULL!", SD_task_get_name(task));
SD_task_get_name(task), SD_task_get_state(task));
xbt_assert1(task->workstation_list != NULL,
"Task '%s': workstation_list is NULL!", SD_task_get_name(task));
* (ie when its dependencies are satisfied).
* If one of the workstations where the task is scheduled on is busy (in sequential mode),
* the task doesn't start.
* (ie when its dependencies are satisfied).
* If one of the workstations where the task is scheduled on is busy (in sequential mode),
* the task doesn't start.
- xbt_assert2(__SD_task_is_ready(task),
- "Task '%s' is not ready! Task state: %d",
+ xbt_assert2(__SD_task_is_runnable(task),
+ "Task '%s' is not runnable! Task state: %d",
DEBUG1("Destroying task %s...", SD_task_get_name(task));
__SD_task_remove_dependencies(task);
DEBUG1("Destroying task %s...", SD_task_get_name(task));
__SD_task_remove_dependencies(task);
- /* if the task was scheduled or ready we have to free the scheduling parameters */
- if (__SD_task_is_scheduled_or_ready(task))
+ /* if the task was scheduled or runnable we have to free the scheduling parameters */
+ if (__SD_task_is_scheduled_or_runnable(task))
__SD_task_destroy_scheduling_data(task);
xbt_swag_remove(task,task->state_set);
__SD_task_destroy_scheduling_data(task);
xbt_swag_remove(task,task->state_set);
if (task->kind == SD_TASK_COMP_SEQ) {
VERB3("Schedule computation task %s on %s. It costs %.f flops",
SD_task_get_name(task),SD_workstation_get_name(task->workstation_list[0]),
if (task->kind == SD_TASK_COMP_SEQ) {
VERB3("Schedule computation task %s on %s. It costs %.f flops",
SD_task_get_name(task),SD_workstation_get_name(task->workstation_list[0]),