Changeset ba781f9 in rtems-docs


Ignore:
Timestamp:
Feb 1, 2017, 12:32:41 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
a0d2eee
Parents:
9de1be6
Message:

c-user: Move scheduler directives

Location:
c-user
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c-user/scheduling_concepts.rst

    r9de1be6 rba781f9  
    2525allocate the all important resource of processor time to the various tasks
    2626competing for attention.
     27
     28The directives provided by the scheduler manager are:
     29
     30- rtems_scheduler_ident_ - Get ID of a scheduler
     31
     32- rtems_scheduler_get_processor_set_ - Get processor set of a scheduler
     33
     34- rtems_scheduler_add_processor_ - Add processor to a scheduler
     35
     36- rtems_scheduler_remove_processor_ - Remove processor from a scheduler
    2737
    2838Scheduling Algorithms
     
    436446- The running task raises the priority of a task above its own and the running
    437447  task is in preemption mode.
     448
     449Directives
     450==========
     451
     452This section details the scheduler manager.  A subsection is dedicated to each
     453of these services and describes the calling sequence, related constants, usage,
     454and status codes.
     455
     456.. raw:: latex
     457
     458   \clearpage
     459
     460.. _rtems_scheduler_ident:
     461
     462SCHEDULER_IDENT - Get ID of a scheduler
     463---------------------------------------
     464
     465CALLING SEQUENCE:
     466    .. code-block:: c
     467
     468        rtems_status_code rtems_scheduler_ident(
     469            rtems_name  name,
     470            rtems_id   *id
     471        );
     472
     473DIRECTIVE STATUS CODES:
     474    .. list-table::
     475     :class: rtems-table
     476
     477     * - ``RTEMS_SUCCESSFUL``
     478       - Successful operation.
     479     * - ``RTEMS_INVALID_ADDRESS``
     480       - The ``id`` parameter is ``NULL``.
     481     * - ``RTEMS_INVALID_NAME``
     482       - Invalid scheduler name.
     483
     484DESCRIPTION:
     485    Identifies a scheduler by its name.  The scheduler name is determined by
     486    the scheduler configuration.  See :ref:`Configuring Clustered Schedulers`
     487    and :ref:`Configuring a Scheduler Name`.
     488
     489NOTES:
     490    None.
     491
     492.. raw:: latex
     493
     494   \clearpage
     495
     496.. _rtems_scheduler_get_processor_set:
     497
     498SCHEDULER_GET_PROCESSOR_SET - Get processor set of a scheduler
     499--------------------------------------------------------------
     500
     501CALLING SEQUENCE:
     502    .. code-block:: c
     503
     504        rtems_status_code rtems_scheduler_get_processor_set(
     505            rtems_id   scheduler_id,
     506            size_t     cpusetsize,
     507            cpu_set_t *cpuset
     508        );
     509
     510DIRECTIVE STATUS CODES:
     511    .. list-table::
     512     :class: rtems-table
     513
     514     * - ``RTEMS_SUCCESSFUL``
     515       - Successful operation.
     516     * - ``RTEMS_INVALID_ID``
     517       - Invalid scheduler instance identifier.
     518     * - ``RTEMS_INVALID_ADDRESS``
     519       - The ``cpuset`` parameter is ``NULL``.
     520     * - ``RTEMS_INVALID_NUMBER``
     521       - The processor set buffer is too small for the set of processors owned
     522         by the scheduler instance.
     523
     524DESCRIPTION:
     525    Returns the processor set owned by the scheduler instance in ``cpuset``.  A
     526    set bit in the processor set means that this processor is owned by the
     527    scheduler instance and a cleared bit means the opposite.
     528
     529NOTES:
     530    None.
     531
     532.. raw:: latex
     533
     534   \clearpage
     535
     536.. _rtems_scheduler_add_processor:
     537
     538SCHEDULER_ADD_PROCESSOR - Add processor to a scheduler
     539------------------------------------------------------
     540
     541CALLING SEQUENCE:
     542    .. code-block:: c
     543
     544        rtems_status_code rtems_scheduler_add_processor(
     545            rtems_id scheduler_id,
     546            uint32_t cpu_index
     547        );
     548
     549DIRECTIVE STATUS CODES:
     550    .. list-table::
     551     :class: rtems-table
     552
     553     * - ``RTEMS_SUCCESSFUL``
     554       - Successful operation.
     555     * - ``RTEMS_INVALID_ID``
     556       - Invalid scheduler instance identifier.
     557     * - ``RTEMS_NOT_CONFIGURED``
     558       - The processor is not configured to be used by the application.
     559     * - ``RTEMS_INCORRECT_STATE``
     560       - The processor is configured to be used by the application, however, it
     561         is not online.
     562     * - ``RTEMS_RESOURCE_IN_USE``
     563       - The processor is already assigned to a scheduler instance.
     564
     565DESCRIPTION:
     566    Adds a processor to the set of processors owned by the specified scheduler
     567    instance.
     568
     569NOTES:
     570    Must be called from task context.  This operation obtains and releases the
     571    objects allocator lock.
     572
     573.. raw:: latex
     574
     575   \clearpage
     576
     577.. _rtems_scheduler_remove_processor:
     578
     579SCHEDULER_REMOVE_PROCESSOR - Remove processor from a scheduler
     580--------------------------------------------------------------
     581
     582CALLING SEQUENCE:
     583    .. code-block:: c
     584
     585        rtems_status_code rtems_scheduler_remove_processor(
     586            rtems_id scheduler_id,
     587            uint32_t cpu_index
     588        );
     589
     590DIRECTIVE STATUS CODES:
     591    .. list-table::
     592     :class: rtems-table
     593
     594     * - ``RTEMS_SUCCESSFUL``
     595       - Successful operation.
     596     * - ``RTEMS_INVALID_ID``
     597       - Invalid scheduler instance identifier.
     598     * - ``RTEMS_INVALID_NUMBER``
     599       - The processor is not owned by the specified scheduler instance.
     600     * - ``RTEMS_RESOURCE_IN_USE``
     601       - The set of processors owned by the specified scheduler instance would
     602         be empty after the processor removal and there exists a non-idle task
     603         that uses this scheduler instance as its home scheduler instance.
     604
     605DESCRIPTION:
     606    Removes a processor from set of processors owned by the specified scheduler
     607    instance.
     608
     609NOTES:
     610    Must be called from task context.  This operation obtains and releases the
     611    objects allocator lock.  Removing a processor from a scheduler is a complex
     612    operation that involves all tasks of the system.
  • c-user/symmetric_multiprocessing_services.rst

    r9de1be6 rba781f9  
    4040
    4141- rtems_get_current_processor_ - Get current processor index
    42 
    43 - rtems_scheduler_ident_ - Get ID of a scheduler
    44 
    45 - rtems_scheduler_get_processor_set_ - Get processor set of a scheduler
    46 
    47 - rtems_scheduler_add_processor_ - Add processor to a scheduler
    48 
    49 - rtems_scheduler_remove_processor_ - Remove processor from a scheduler
    5042
    5143Background
     
    574566NOTES:
    575567    None.
    576 
    577 .. raw:: latex
    578 
    579    \clearpage
    580 
    581 .. _rtems_scheduler_ident:
    582 
    583 SCHEDULER_IDENT - Get ID of a scheduler
    584 ---------------------------------------
    585 
    586 CALLING SEQUENCE:
    587     .. code-block:: c
    588 
    589         rtems_status_code rtems_scheduler_ident(
    590             rtems_name  name,
    591             rtems_id   *id
    592         );
    593 
    594 DIRECTIVE STATUS CODES:
    595     .. list-table::
    596      :class: rtems-table
    597 
    598      * - ``RTEMS_SUCCESSFUL``
    599        - Successful operation.
    600      * - ``RTEMS_INVALID_ADDRESS``
    601        - The ``id`` parameter is ``NULL``.
    602      * - ``RTEMS_INVALID_NAME``
    603        - Invalid scheduler name.
    604 
    605 DESCRIPTION:
    606     Identifies a scheduler by its name.  The scheduler name is determined by
    607     the scheduler configuration.  See :ref:`Configuring Clustered Schedulers`
    608     and :ref:`Configuring a Scheduler Name`.
    609 
    610 NOTES:
    611     None.
    612 
    613 .. raw:: latex
    614 
    615    \clearpage
    616 
    617 .. _rtems_scheduler_get_processor_set:
    618 
    619 SCHEDULER_GET_PROCESSOR_SET - Get processor set of a scheduler
    620 --------------------------------------------------------------
    621 
    622 CALLING SEQUENCE:
    623     .. code-block:: c
    624 
    625         rtems_status_code rtems_scheduler_get_processor_set(
    626             rtems_id   scheduler_id,
    627             size_t     cpusetsize,
    628             cpu_set_t *cpuset
    629         );
    630 
    631 DIRECTIVE STATUS CODES:
    632     .. list-table::
    633      :class: rtems-table
    634 
    635      * - ``RTEMS_SUCCESSFUL``
    636        - Successful operation.
    637      * - ``RTEMS_INVALID_ID``
    638        - Invalid scheduler instance identifier.
    639      * - ``RTEMS_INVALID_ADDRESS``
    640        - The ``cpuset`` parameter is ``NULL``.
    641      * - ``RTEMS_INVALID_NUMBER``
    642        - The processor set buffer is too small for the set of processors owned
    643          by the scheduler instance.
    644 
    645 DESCRIPTION:
    646     Returns the processor set owned by the scheduler instance in ``cpuset``.  A
    647     set bit in the processor set means that this processor is owned by the
    648     scheduler instance and a cleared bit means the opposite.
    649 
    650 NOTES:
    651     None.
    652 
    653 .. raw:: latex
    654 
    655    \clearpage
    656 
    657 .. _rtems_scheduler_add_processor:
    658 
    659 SCHEDULER_ADD_PROCESSOR - Add processor to a scheduler
    660 ------------------------------------------------------
    661 
    662 CALLING SEQUENCE:
    663     .. code-block:: c
    664 
    665         rtems_status_code rtems_scheduler_add_processor(
    666             rtems_id scheduler_id,
    667             uint32_t cpu_index
    668         );
    669 
    670 DIRECTIVE STATUS CODES:
    671     .. list-table::
    672      :class: rtems-table
    673 
    674      * - ``RTEMS_SUCCESSFUL``
    675        - Successful operation.
    676      * - ``RTEMS_INVALID_ID``
    677        - Invalid scheduler instance identifier.
    678      * - ``RTEMS_NOT_CONFIGURED``
    679        - The processor is not configured to be used by the application.
    680      * - ``RTEMS_INCORRECT_STATE``
    681        - The processor is configured to be used by the application, however, it
    682          is not online.
    683      * - ``RTEMS_RESOURCE_IN_USE``
    684        - The processor is already assigned to a scheduler instance.
    685 
    686 DESCRIPTION:
    687     Adds a processor to the set of processors owned by the specified scheduler
    688     instance.
    689 
    690 NOTES:
    691     Must be called from task context.  This operation obtains and releases the
    692     objects allocator lock.
    693 
    694 .. raw:: latex
    695 
    696    \clearpage
    697 
    698 .. _rtems_scheduler_remove_processor:
    699 
    700 SCHEDULER_REMOVE_PROCESSOR - Remove processor from a scheduler
    701 --------------------------------------------------------------
    702 
    703 CALLING SEQUENCE:
    704     .. code-block:: c
    705 
    706         rtems_status_code rtems_scheduler_remove_processor(
    707             rtems_id scheduler_id,
    708             uint32_t cpu_index
    709         );
    710 
    711 DIRECTIVE STATUS CODES:
    712     .. list-table::
    713      :class: rtems-table
    714 
    715      * - ``RTEMS_SUCCESSFUL``
    716        - Successful operation.
    717      * - ``RTEMS_INVALID_ID``
    718        - Invalid scheduler instance identifier.
    719      * - ``RTEMS_INVALID_NUMBER``
    720        - The processor is not owned by the specified scheduler instance.
    721      * - ``RTEMS_RESOURCE_IN_USE``
    722        - The set of processors owned by the specified scheduler instance would
    723          be empty after the processor removal and there exists a non-idle task
    724          that uses this scheduler instance as its home scheduler instance.
    725 
    726 DESCRIPTION:
    727     Removes a processor from set of processors owned by the specified scheduler
    728     instance.
    729 
    730 NOTES:
    731     Must be called from task context.  This operation obtains and releases the
    732     objects allocator lock.  Removing a processor from a scheduler is a complex
    733     operation that involves all tasks of the system.
Note: See TracChangeset for help on using the changeset viewer.