[RTEMS Project] #2749: rtems_task_set_scheduler() has insufficient parameters

RTEMS trac trac at rtems.org
Thu Jun 30 11:12:19 UTC 2016


#2749: rtems_task_set_scheduler() has insufficient parameters
-----------------------------+-----------------------------
 Reporter:  sebastian.huber  |      Owner:  sebastian.huber
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:  4.12
Component:  SMP              |    Version:  4.11
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 Task priorities are only valid within a scheduler instance.  The
 rtems_task_set_scheduler() directive moves a task from one scheduler
 instance to another using the current priority of the thread. However, the
 current task priority of the source scheduler instance is undefined in the
 target scheduler instance.  Add a third parameter to specify the priority.

 {{{
 /**
  * @brief Sets the scheduler instance of a task.
  *
  * Initially, the scheduler instance of a task is set to the scheduler
 instance
  * of the task that created it.  This directive allows to move a task from
 its
  * current scheduler instance to another specified by the scheduler
 identifier.
  *
  * @param[in] task_id Identifier of the task.  Use @ref RTEMS_SELF to
 select
  *   the executing task.
  * @param[in] scheduler_id Identifier of the scheduler instance.
  * @param[in] priority The task priority with respect to the new scheduler
  *   instance.  The real and initial priority of the task is set to this
 value.
  *   The initial priority is used by rtems_task_restart() for example.
  *
  * @retval RTEMS_SUCCESSFUL Successful operation.
  * @retval RTEMS_ILLEGAL_ON_REMOTE_OBJECT Directive is illegal on remote
 tasks.
  * @retval RTEMS_INCORRECT_STATE The task is in a state that forbids a
  *   scheduler change.
  * @retval RTEMS_INVALID_ID Invalid task or scheduler identifier.
  * @retval RTEMS_INVALID_PRIORITY Invalid priority.
  *
  * @see rtems_scheduler_ident().
  */
 rtems_status_code rtems_task_set_scheduler(
   rtems_id            task_id,
   rtems_id            scheduler_id,
   rtems_task_priority priority
 );
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/2749>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list