Changeset bcdca5d in rtems-docs
- Timestamp:
- Nov 10, 2016, 10:34:32 AM (4 years ago)
- Branches:
- 5, am, master
- Children:
- 6345b2d
- Parents:
- 6297ad3
- Location:
- c-user
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c-user/configuring_a_system.rst
r6297ad3 rbcdca5d 4041 4041 - ``RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL``. 4042 4042 4043 It is possible to add/remove processors to/from scheduler instances at 4044 run-time, see :ref:`rtems_scheduler_add_processor` and 4045 :ref:`rtems_scheduler_remove_processor`. 4046 4043 4047 ERRORS: 4044 4048 In case one of the scheduler indices … … 4092 4096 #define CONFIGURE_SMP_MAXIMUM_PROCESSORS 8 4093 4097 #define CONFIGURE_MAXIMUM_PRIORITY 255 4098 4094 4099 /* Make the scheduler algorithm available */ 4095 4100 #define CONFIGURE_SCHEDULER_PRIORITY_SMP 4096 4101 #include <rtems/scheduler.h> 4102 4097 4103 /* Create contexts for the two scheduler instances */ 4098 4104 RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(io, CONFIGURE_MAXIMUM_PRIORITY + 1); 4099 4105 RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(work, CONFIGURE_MAXIMUM_PRIORITY + 1); 4106 4100 4107 /* Define the scheduler table */ 4101 4108 #define CONFIGURE_SCHEDULER_CONTROLS \\ 4102 RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \ 4103 io, \ 4104 rtems_build_name('I', 'O', ' ', ' ') \ 4105 ), \ 4106 RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \ 4107 work, \ 4108 rtems_build_name('W', 'O', 'R', 'K') \ 4109 ) 4110 /* Define the processor to scheduler assignments */ 4109 RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \ 4110 io, \ 4111 rtems_build_name('I', 'O', ' ', ' ') \ 4112 ), \ 4113 RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( \ 4114 work, \ 4115 rtems_build_name('W', 'O', 'R', 'K') \ 4116 ) 4117 4118 /* Define the initial processor to scheduler assignments */ 4111 4119 #define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \ 4112 4113 4114 4115 4116 4117 4118 4119 4120 RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ 4121 RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \ 4122 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ 4123 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ 4124 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ 4125 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ 4126 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ 4127 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) 4120 4128 4121 4129 .. COMMENT: === SMP Specific Configuration Parameters === -
c-user/symmetric_multiprocessing_services.rst
r6297ad3 rbcdca5d 44 44 45 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 46 50 47 51 - rtems_task_get_scheduler_ - Get scheduler of a task … … 741 745 742 746 * - ``RTEMS_SUCCESSFUL`` 743 - successful operation747 - Successful operation. 744 748 * - ``RTEMS_INVALID_ADDRESS`` 745 - ``id`` is NULL749 - The ``id`` parameter is ``NULL``. 746 750 * - ``RTEMS_INVALID_NAME`` 747 - invalid scheduler name 748 * - ``RTEMS_UNSATISFIED`` 749 - a scheduler with this name exists, but the processor set of this scheduler 750 is empty 751 - Invalid scheduler name. 751 752 752 753 DESCRIPTION: 753 754 Identifies a scheduler by its name. The scheduler name is determined by 754 the scheduler configuration. See :ref:`Configuring a System`. 755 the scheduler configuration. See :ref:`Configuring Clustered Schedulers` 756 and :ref:`Configuring a Scheduler Name`. 755 757 756 758 NOTES: … … 780 782 781 783 * - ``RTEMS_SUCCESSFUL`` 782 - successful operation 784 - Successful operation. 785 * - ``RTEMS_INVALID_ID`` 786 - Invalid scheduler instance identifier. 783 787 * - ``RTEMS_INVALID_ADDRESS`` 784 - ``cpuset`` is NULL 785 * - ``RTEMS_INVALID_ID`` 786 - invalid scheduler id 788 - The ``cpuset`` parameter is ``NULL``. 787 789 * - ``RTEMS_INVALID_NUMBER`` 788 - the affinity set buffer is too small for set of processors owned by789 the scheduler790 - The processor set buffer is too small for the set of processors owned 791 by the scheduler instance. 790 792 791 793 DESCRIPTION: 792 Returns the processor set owned by the scheduler in ``cpuset``. A set bit793 in the processor set means that this processor is owned by the scheduler794 and a cleared bit means the opposite.794 Returns the processor set owned by the scheduler instance in ``cpuset``. A 795 set bit in the processor set means that this processor is owned by the 796 scheduler instance and a cleared bit means the opposite. 795 797 796 798 NOTES: 797 799 None. 800 801 .. raw:: latex 802 803 \clearpage 804 805 .. _rtems_scheduler_add_processor: 806 807 SCHEDULER_ADD_PROCESSOR - Add processor to a scheduler 808 ------------------------------------------------------ 809 810 CALLING SEQUENCE: 811 .. code-block:: c 812 813 rtems_status_code rtems_scheduler_add_processor( 814 rtems_id scheduler_id, 815 uint32_t cpu_index 816 ); 817 818 DIRECTIVE STATUS CODES: 819 .. list-table:: 820 :class: rtems-table 821 822 * - ``RTEMS_SUCCESSFUL`` 823 - Successful operation. 824 * - ``RTEMS_INVALID_ID`` 825 - Invalid scheduler instance identifier. 826 * - ``RTEMS_NOT_CONFIGURED`` 827 - The processor is not configured to be used by the application. 828 * - ``RTEMS_INCORRECT_STATE`` 829 - The processor is configured to be used by the application, however, it 830 is not online. 831 * - ``RTEMS_RESOURCE_IN_USE`` 832 - The processor is already assigned to a scheduler instance. 833 834 DESCRIPTION: 835 Adds a processor to the set of processors owned by the specified scheduler 836 instance. 837 838 NOTES: 839 Must be called from task context. This operation obtains and releases the 840 objects allocator lock. 841 842 .. raw:: latex 843 844 \clearpage 845 846 .. _rtems_scheduler_remove_processor: 847 848 SCHEDULER_REMOVE_PROCESSOR - Remove processor from a scheduler 849 -------------------------------------------------------------- 850 851 CALLING SEQUENCE: 852 .. code-block:: c 853 854 rtems_status_code rtems_scheduler_remove_processor( 855 rtems_id scheduler_id, 856 uint32_t cpu_index 857 ); 858 859 DIRECTIVE STATUS CODES: 860 .. list-table:: 861 :class: rtems-table 862 863 * - ``RTEMS_SUCCESSFUL`` 864 - Successful operation. 865 * - ``RTEMS_INVALID_ID`` 866 - Invalid scheduler instance identifier. 867 * - ``RTEMS_INVALID_NUMBER`` 868 - The processor is not owned by the specified scheduler instance. 869 * - ``RTEMS_RESOURCE_IN_USE`` 870 - The set of processors owned by the specified scheduler instance would 871 be empty after the processor removal and there exists a non-idle task 872 that uses this scheduler instance as its home scheduler instance. 873 874 DESCRIPTION: 875 Removes a processor from set of processors owned by the specified scheduler 876 instance. 877 878 NOTES: 879 Must be called from task context. This operation obtains and releases the 880 objects allocator lock. Removing a processor from a scheduler is a complex 881 operation that involves all tasks of the system. 798 882 799 883 .. raw:: latex
Note: See TracChangeset
for help on using the changeset viewer.