summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Fix scheduler helping implementationSebastian Huber2014-07-101-22/+0
| | | | | Do not extract the idle threads from the ready set so that there is always a thread available for comparison.
* score: Implement scheduler helping protocolSebastian Huber2014-07-091-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The following scheduler operations return a thread in need for help - unblock, - change priority, and - yield. A thread in need for help is a thread that encounters a scheduler state change from scheduled to ready or a thread that cannot be scheduled in an unblock operation. Such a thread can ask threads which depend on resources owned by this thread for help. Add a new ask for help scheduler operation. This operation is used by _Scheduler_Ask_for_help() to help threads in need for help returned by the operations mentioned above. This operation is also used by _Scheduler_Thread_change_resource_root() in case the root of a resource sub-tree changes. A use case is the ownership change of a resource. In case it is not possible to schedule a thread in need for help, then the corresponding scheduler node will be placed into the set of ready scheduler nodes of the scheduler instance. Once a state change from ready to scheduled happens for this scheduler node it may be used to schedule the thread in need for help.
* score: Rename *_Node_get() to *_Thread_get_node()Sebastian Huber2014-07-081-2/+2
| | | | | | This emphasizes that the scheduler node of a thread is returned and this is not a function working with scheduler nodes like the other *_Node_*() functions.
* score: Decouple thread and scheduler nodes on SMPSebastian Huber2014-06-231-23/+25
| | | | | | | Add a chain node to the scheduler node to decouple the thread and scheduler nodes. It is now possible to enqueue a thread in a thread wait queue and use its scheduler node at the same for other threads, e.g. a resouce owner.
* score: Use chain nodes for ready queue supportSebastian Huber2014-06-231-6/+6
| | | | | This reduces the API to the minimum data structures to maximize the re-usability.
* score: Make functions inlineSebastian Huber2014-06-121-23/+114
| | | | | | These functions are used only via the function pointers in the generic SMP scheduler implementation. Provide them as static inline so that the compiler can optimize more easily.
* Add SMP Priority Scheduler with AffinityJoel Sherrill2014-06-111-0/+84
This scheduler attempts to account for needed thread migrations caused as a side-effect of a thread state, affinity, or priority change operation. This scheduler has its own allocate_processor handler named _Scheduler_SMP_Allocate_processor_exact() because _Scheduler_SMP_Allocate_processor() attempts to prevent an executing thread from moving off its current CPU without considering affinity. Without this, the scheduler makes all the right decisions and then they are discarded at the end. ==Side Effects of Adding This Scheduler== Added Thread_Control * parameter to Scheduler_SMP_Get_highest_ready type so methods looking for the highest ready thread can filter by the processor on which the thread blocking resides. This allows affinity to be considered. Simple Priority SMP and Priority SMP ignore this parameter. + Added get_lowest_scheduled argument to _Scheduler_SMP_Enqueue_ordered(). + Added allocate_processor argument to the following methods: - _Scheduler_SMP_Block() - _Scheduler_SMP_Enqueue_scheduled_ordered() - _Scheduler_SMP_Enqueue_scheduled_ordered() + schedulerprioritysmpimpl.h is a new file with prototypes for methods which were formerly static in schedulerprioritysmp.c but now need to be public to be shared with this scheduler. NOTE: _Scheduler_SMP_Get_lowest_ready() appears to have a path which would allow it to return a NULL. Previously, _Scheduler_SMP_Enqueue_ordered() would have asserted on it. If it cannot return a NULL, _Scheduler_SMP_Get_lowest_ready() should have an assertions.