summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-1203/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* score: Optimize scheduler priority updatesSebastian Huber2017-11-201-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thread priority changes may append or prepend the thread to its priority group on the scheduler ready queue. Previously, a separate priority value and a prepend-it flag in the scheduler node were used to propagate a priority change to the scheduler. Now, use an append-it bit in the priority control and reduce the plain priority value to 63 bits. This change leads to a significant code size reduction (about 25%) of the SMP schedulers. The negligible increase of the standard priority scheduler is due to some additional shift operations (SCHEDULER_PRIORITY_MAP() and SCHEDULER_PRIORITY_UNMAP()). Before: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 464 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 328 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 24112 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 37204 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 42236 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o After: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 272 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 208 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 332 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 18860 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 28520 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 32664 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o
* score: Delete _Scheduler_Thread_set_priority()Sebastian Huber2017-10-261-12/+0
|
* score: Remove CPU_set_ControlSebastian Huber2017-10-111-1/+0
| | | | | | Use Processor_mask instead. Update #2514.
* score: Fix set schedulerSebastian Huber2017-07-101-5/+13
| | | | | | | Ensure that the thread processor affinity fits the new scheduler instance. Update #3059.
* score: Add scheduler node to set affinity opSebastian Huber2017-07-071-0/+2
| | | | Update #3059.
* score: Fix default set affinitySebastian Huber2017-07-071-4/+3
| | | | | | | | The set of online processors must be a subset of the thread processor affinity for the schedulers without arbitrary processor affinity support to avoid problems in case of processor addition and removal. Update #3059.
* score: Use processor mask for set affinitySebastian Huber2017-07-071-26/+5
| | | | Update #3059.
* score: Add processor set to scheduler contextSebastian Huber2017-07-071-18/+7
| | | | | | | Replace the simple processor count with the processor set owned by the scheduler instance. Update #3059.
* score: Move processor affinity to Thread_ControlSebastian Huber2017-07-071-14/+0
| | | | Update #3059.
* score: Fix scheduler yield in SMP configurationsSebastian Huber2017-03-071-18/+5
| | | | | | | | | Check that no ask help request is registered during unblock and yield scheduler operations. There is no need to ask for help if a scheduled thread yields, since this is already covered by the pre-emption detection. Update #2556.
* score: Improve scheduler helping protocolSebastian Huber2017-02-031-98/+41
| | | | | | | | | | | Only register ask for help requests in the scheduler unblock and yield operations. The actual ask for help operation is carried out during _Thread_Do_dispatch() on a processor related to the thread. This yields a better separation of scheduler instances. A thread of one scheduler instance should not be forced to carry out too much work for threads on other scheduler instances. Update #2556.
* Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill2017-01-111-4/+0
|
* score: Delete obsolete scheduler debug aidSebastian Huber2016-11-231-6/+0
|
* score: Rename _Scheduler_AssignmentsSebastian Huber2016-11-091-23/+0
| | | | | | | | Rename _Scheduler_Assignments into _Scheduler_Initial_assignments to make it clear that they may not reflect the run-time scheduler assignment. Update #2797.
* score: Add scheduler to per-CPU informationSebastian Huber2016-11-091-20/+16
| | | | | | | This makes it possible to adjust the scheduler of a processor at run-time. Update #2797.
* score: Simplify _Scheduler_Get_by_id()Sebastian Huber2016-11-091-44/+66
| | | | | | | | | | Avoid dead code in non-SMP configurations. Return scheduler identifier independent of the current processor count of the scheduler via rtems_scheduler_ident(), since this value may change during run-time. Check the processor count in _Scheduler_Set() under scheduler lock protection. Update #2797.
* score: Fix _Scheduler_Try_to_schedule_node()Sebastian Huber2016-11-041-10/+14
| | | | | In case the thread is scheduled and the sticky level is greater than one, then we must use an idle thread for correctness of MrsP.
* score: Delete unused _Scheduler_Is_id_valid()Sebastian Huber2016-11-031-10/+0
|
* score: Relax _Scheduler_Set() restrictionsSebastian Huber2016-11-031-4/+5
| | | | | | No longer unconditionally prevent scheduler changes if the thread owns resources. Prevent a scheduler change only in case other threads wait for the resource.
* score: Simplify yield and unblock scheduler opsSebastian Huber2016-11-021-4/+4
| | | | Update #2556.
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-36/+9
| | | | | | | | Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
* score: Delete Thread_Scheduler_control::own_nodeSebastian Huber2016-11-021-3/+2
| | | | Update #2556.
* score: Delete Thread_Scheduler_control::nodeSebastian Huber2016-11-021-12/+0
| | | | Update #2556.
* score: Second part of new MrsP implementationSebastian Huber2016-11-021-169/+91
| | | | Update #2556.
* score: Delete unused scheduler ask for help X opSebastian Huber2016-11-021-152/+0
|
* score: Delete _Scheduler_Ask_for_help_if_necessarySebastian Huber2016-11-021-99/+1
| | | | | | Delete Thread_Control::Resource_node. Update #2556.
* score: Delete unused functionsSebastian Huber2016-11-021-42/+0
| | | | | | | Delete _Scheduler_Thread_change_resource_root() and _Scheduler_Thread_change_help_state(). Update #2556.
* score: First part of new MrsP implementationSebastian Huber2016-11-021-0/+56
| | | | Update #2556.
* score: Use scheduler instance specific locksSebastian Huber2016-11-021-4/+16
| | | | Update #2556.
* score: Yield support for new SMP helping protocolSebastian Huber2016-11-021-11/+47
| | | | Update #2556.
* score: Add new SMP scheduler helping protocolSebastian Huber2016-11-021-36/+122
| | | | Update #2556.
* score: Add _Thread_Scheduler_process_requests()Sebastian Huber2016-11-021-0/+9
| | | | Update #2556.
* score: Add scheduler node requestsSebastian Huber2016-11-021-0/+8
| | | | | | | Add the ability to add/remove scheduler nodes to/from the set of scheduler nodes available to the schedulers for a particular thread. Update #2556.
* score: Protect thread CPU by thread scheduler lockSebastian Huber2016-11-021-5/+8
| | | | Update #2556.
* score: Protect thread scheduler state changesSebastian Huber2016-11-021-6/+25
| | | | Update #2556.
* score: Pass scheduler node to unblock operationSebastian Huber2016-11-021-1/+5
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to block operationSebastian Huber2016-11-021-4/+12
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to yield operationSebastian Huber2016-11-021-1/+5
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to update priority opSebastian Huber2016-11-021-12/+16
| | | | | | | This enables to call this scheduler operation for all scheduler nodes available to a thread. Update #2556.
* score: Rename scheduler ask for help stuffSebastian Huber2016-11-021-4/+4
| | | | | | | | Rename the scheduler ask for help stuff since this will be replaced step by step with a second generation of the scheduler helping protocol. Keep the old one for now in parallel to reduce the patch set sizes. Update #2556.
* score: Manage scheduler nodes via thread queuesSebastian Huber2016-09-211-0/+7
| | | | Update #2556.
* score: Add scheduler node table for each threadSebastian Huber2016-09-211-14/+27
| | | | Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-35/+51
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* score: Add scheduler node implementation headerSebastian Huber2016-09-081-100/+0
| | | | Update #2556.
* score: Move thread wait node to scheduler nodeSebastian Huber2016-09-081-8/+9
| | | | Update #2556.
* score: Fix a release/cancel job race conditionSebastian Huber2016-08-041-4/+12
| | | | | | | | Split up the potential thread priority change in the scheduler release/cancel job operation. Protect the rate monotonic period state with a dedicated SMP lock. This avoids a race condition during _Rate_monotonic_Timeout() while _Rate_monotonic_Cancel() is called on another processor.
* score: Indroduce cancel job scheduler operationSebastian Huber2016-08-041-0/+14
| | | | | Do not use a deadline value of zero to indicate a job cancellation. Use a dedicated scheduler operation for this.
* score: Turn thread lock into thread wait lockSebastian Huber2016-07-271-0/+14
| | | | | | | | | The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
* score: Change scheduler node init and destroySebastian Huber2016-07-011-6/+14
| | | | | | Provide the scheduler node to initialize or destroy to the corresponding operations. This makes it possible to have more than one scheduler node per thread.