コード例 #1
0
ファイル: msg_task.cpp プロジェクト: RockyMeadow/simgrid
/** \ingroup m_task_management
 * \brief Changes the priority of a computation task. This priority doesn't affect the transfer rate. A priority of 2
 *        will make a task receive two times more cpu power than the other ones.
 */
void MSG_task_set_priority(msg_task_t task, double priority)
{
  xbt_assert((task != NULL) && (task->simdata != NULL), "Invalid parameter");
  task->simdata->priority = 1 / priority;
  if (task->simdata->compute)
    simcall_execution_set_priority(task->simdata->compute,
        task->simdata->priority);
}
コード例 #2
0
/** \ingroup m_task_management
 * \brief Changes the priority of a computation task. This priority doesn't affect the transfer rate. A priority of 2
 *        will make a task receive two times more cpu power than the other ones.
 */
void MSG_task_set_priority(msg_task_t task, double priority)
{
  task->simdata->priority = 1 / priority;
  if (task->simdata->compute)
    simcall_execution_set_priority(task->simdata->compute, task->simdata->priority);
}