Changeset 05ca53d in rtems for cpukit/rtems


Ignore:
Timestamp:
Oct 31, 2016, 12:08:33 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
58bced6
Parents:
1f5bee3
git-author:
Sebastian Huber <sebastian.huber@…> (10/31/16 12:08:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/10/16 08:22:09)
Message:

rtems: Add scheduler processor add/remove

Update #2797.

Location:
cpukit/rtems
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r1f5bee3 r05ca53d  
    106106librtems_a_SOURCES += src/taskwakeafter.c
    107107librtems_a_SOURCES += src/taskwakewhen.c
     108librtems_a_SOURCES += src/scheduleraddprocessor.c
    108109librtems_a_SOURCES += src/schedulergetprocessorset.c
    109110librtems_a_SOURCES += src/schedulerident.c
     111librtems_a_SOURCES += src/schedulerremoveprocessor.c
    110112
    111113## RATEMON_C_FILES
  • cpukit/rtems/include/rtems/rtems/tasks.h

    r1f5bee3 r05ca53d  
    466466 * @param[in] task_id Identifier of the task.  Use @ref RTEMS_SELF to select
    467467 * the executing task.
    468  * @param[out] scheduler_id Identifier of the scheduler.
     468 * @param[out] scheduler_id Identifier of the scheduler instance.
    469469 *
    470470 * @retval RTEMS_SUCCESSFUL Successful operation.
     
    564564#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    565565/**
    566  * @brief Gets the set of processors owned by the scheduler.
    567  *
    568  * @param[in] scheduler_id Identifier of the scheduler.
     566 * @brief Gets the set of processors owned by the specified scheduler instance.
     567 *
     568 * @param[in] scheduler_id Identifier of the scheduler instance.
    569569 * @param[in] cpusetsize Size of the specified processor set buffer in
    570570 * bytes.  This value must be positive.
     
    575575 * @retval RTEMS_SUCCESSFUL Successful operation.
    576576 * @retval RTEMS_INVALID_ADDRESS The @a cpuset parameter is @c NULL.
    577  * @retval RTEMS_INVALID_ID Invalid scheduler identifier.
     577 * @retval RTEMS_INVALID_ID Invalid scheduler instance identifier.
    578578 * @retval RTEMS_INVALID_NUMBER The processor set buffer is too small for the
    579579 * set of processors owned by the scheduler.
     
    585585);
    586586#endif
     587
     588/**
     589 * @brief Adds a processor to the set of processors owned by the specified
     590 * scheduler instance.
     591 *
     592 * Must be called from task context.  This operation obtains and releases the
     593 * objects allocator lock.
     594 *
     595 * @param[in] scheduler_id Identifier of the scheduler instance.
     596 * @param[in] cpu_index Index of the processor to add.
     597 *
     598 * @retval RTEMS_SUCCESSFUL Successful operation.
     599 * @retval RTEMS_INVALID_ID Invalid scheduler instance identifier.
     600 * @retval RTEMS_NOT_CONFIGURED The processor is not configured to be used by
     601 *   the application.
     602 * @retval RTEMS_INCORRECT_STATE The processor is configured to be used by
     603 *   the application, however, it is not online.
     604 * @retval RTEMS_RESOURCE_IN_USE The processor is already assigned to a
     605 *   scheduler instance.
     606 */
     607rtems_status_code rtems_scheduler_add_processor(
     608  rtems_id scheduler_id,
     609  uint32_t cpu_index
     610);
     611
     612/**
     613 * @brief Removes a processor from set of processors owned by the specified
     614 * scheduler instance.
     615 *
     616 * Must be called from task context.  This operation obtains and releases the
     617 * objects allocator lock.  Removing a processor from a scheduler is a complex
     618 * operation that involves all tasks of the system.
     619 *
     620 * @param[in] scheduler_id Identifier of the scheduler instance.
     621 * @param[in] cpu_index Index of the processor to add.
     622 *
     623 * @retval RTEMS_SUCCESSFUL Successful operation.
     624 * @retval RTEMS_INVALID_ID Invalid scheduler instance identifier.
     625 * @retval RTEMS_INVALID_NUMBER The processor is not owned by the specified
     626 *   scheduler instance.
     627 * @retval RTEMS_RESOURCE_IN_USE The set of processors owned by the specified
     628 *   scheduler instance would be empty after the processor removal and there
     629 *   exists a non-idle task that uses this scheduler instance as its home
     630 *   scheduler instance.
     631 */
     632rtems_status_code rtems_scheduler_remove_processor(
     633  rtems_id scheduler_id,
     634  uint32_t cpu_index
     635);
    587636
    588637/**@}*/
Note: See TracChangeset for help on using the changeset viewer.