[RTEMS Project] #2797: Add ability to add/remove processors to/from a scheduler instance

RTEMS trac trac at rtems.org
Mon Oct 31 11:32:29 UTC 2016


#2797: Add ability to add/remove processors to/from a scheduler instance
-----------------------------+-----------------------------
 Reporter:  sebastian.huber  |      Owner:  sebastian.huber
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  4.12
Component:  SMP              |    Version:  4.12
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 The scheduler configuration is done at link-time.  In order to support
 run-time re-configuration add functions to dd/remove processors to/from a
 scheduler instance.

 {{{
 #!c
 /**
  * @brief Adds a processor the set of processors owned by the scheduler.
  *
  * Must be called from task context.  This operation obtains and releases
 the
  * objects allocator lock.
  *
  * @param[in] scheduler_id Identifier of the scheduler.
  * @param[in] cpu_index Index of the processor to add.
  *
  * @retval RTEMS_SUCCESSFUL Successful operation.
  * @retval RTEMS_INVALID_ID Invalid scheduler identifier.
  * @retval RTEMS_NOT_CONFIGURED The processor is not configured to be used
 by
  *   the application.
  * @retval RTEMS_INCORRECT_STATE The processor is configured to be used by
  *   the application, however, it is not available.
  */
 rtems_status_code rtems_scheduler_add_processor(
   rtems_id scheduler_id,
   uint32_t cpu_index
 );

 /**
  * @brief Removes a processor from set of processors owned by the
 scheduler.
  *
  * Must be called from task context.  This operation obtains and releases
 the
  * objects allocator lock.  Removing a processor from a scheduler is a
 complex
  * operation that involves all tasks in the system.
  *
  * @param[in] scheduler_id Identifier of the scheduler.
  * @param[in] cpu_index Index of the processor to add.
  *
  * @retval RTEMS_SUCCESSFUL Successful operation.
  * @retval RTEMS_INVALID_ID Invalid scheduler identifier.
  * @retval RTEMS_INVALID_NUMBER The processor is not owned by the
 scheduler.
  * @retval RTEMS_RESOURCE_IN_USE The set of processors owned by the
 scheduler
  *   would be empty after the processor removal and there exists a non-
 idle
  *   task that uses this scheduler as its home scheduler.
  */
 rtems_status_code rtems_scheduler_remove_processor(
   rtems_id scheduler_id,
   uint32_t cpu_index
 );
 }}}

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


More information about the bugs mailing list