Add ability to add/remove processors to/from a scheduler instance
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.
/**
* @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
);
In 2612a0bf5b9f0105315d62cbacfa9d29a5caa4b5/rtems: