summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulersmpimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add simple affinity support to EDF SMPSebastian Huber2017-07-101-5/+135
| | | | Update #3059.
* score: Pass scheduler nodes to processor allocatorSebastian Huber2017-07-071-18/+14
| | | | | | | This allows scheduler implementations to easily access scheduler-specific data. Update #3059.
* score: Add red-black tree node to Scheduler_NodeSebastian Huber2017-06-291-9/+9
| | | | | | | In SMP configurations, add a red-black tree node to Scheduler_Node to enable an EDF scheduler implementation. Update #3056.
* score: Fix scheduler yield in SMP configurationsSebastian Huber2017-03-071-2/+2
| | | | | | | | | 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-8/+10
| | | | | | | | | | | 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.
* score: Delete obsolete scheduler debug aidSebastian Huber2016-11-231-6/+0
|
* rtems: Add scheduler processor add/removeSebastian Huber2016-11-101-0/+92
| | | | Update #2797.
* score: Add scheduler to per-CPU informationSebastian Huber2016-11-091-1/+1
| | | | | | | This makes it possible to adjust the scheduler of a processor at run-time. Update #2797.
* score: Simplify yield and unblock scheduler opsSebastian Huber2016-11-021-70/+45
| | | | Update #2556.
* score: Delete Thread_Scheduler_control::own_nodeSebastian Huber2016-11-021-1/+1
| | | | Update #2556.
* score: Delete Thread_Scheduler_control::nodeSebastian Huber2016-11-021-1/+1
| | | | Update #2556.
* score: Delete Scheduler_Node::accepts_helpSebastian Huber2016-11-021-6/+1
| | | | Update #2556.
* score: Second part of new MrsP implementationSebastian Huber2016-11-021-26/+72
| | | | Update #2556.
* score: Delete unused scheduler ask for help X opSebastian Huber2016-11-021-55/+0
|
* score: Simplify update priority scheduler opSebastian Huber2016-11-021-11/+6
| | | | Remove unused return status.
* score: Yield support for new SMP helping protocolSebastian Huber2016-11-021-3/+8
| | | | Update #2556.
* score: Add new SMP scheduler helping protocolSebastian Huber2016-11-021-6/+167
| | | | Update #2556.
* score: Protect thread CPU by thread scheduler lockSebastian Huber2016-11-021-12/+24
| | | | Update #2556.
* score: Protect thread scheduler state changesSebastian Huber2016-11-021-24/+33
| | | | Update #2556.
* score: Simplify _Scheduler_SMP_Node_change_state()Sebastian Huber2016-11-021-38/+26
| | | | Update #2556.
* score: Pass scheduler node to unblock operationSebastian Huber2016-11-021-19/+21
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to block operationSebastian Huber2016-11-021-11/+16
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to yield operationSebastian Huber2016-11-021-6/+6
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to update priority opSebastian Huber2016-11-021-18/+34
| | | | | | | 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-1/+1
| | | | | | | | 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: Fix _Scheduler_Try_to_schedule_node() usageSebastian Huber2016-11-021-72/+65
| | | | Fix wrong use of continue statement in while loops.
* score: Rework thread priority managementSebastian Huber2016-09-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove superfluous SMP debug supportSebastian Huber2016-09-071-3/+0
| | | | This information turned out to be useless in the last couple of months.
* score: Strong APA scheduler processor allocationSebastian Huber2016-06-301-0/+21
| | | | | Use _Scheduler_SMP_Allocate_processor_exact() to prevent unexpected migrations.
* score: Add thread priority to scheduler nodesSebastian Huber2016-06-221-14/+39
| | | | | | | | | | | | | | | | | | The thread priority is manifest in two independent areas. One area is the user visible thread priority along with a potential thread queue. The other is the scheduler. Currently, a thread priority update via _Thread_Change_priority() first updates the user visble thread priority and the thread queue, then the scheduler is notified if necessary. The priority is passed to the scheduler via a local variable. A generation counter ensures that the scheduler discards out-of-date priorities. This use of a local variable ties the update in these two areas close together. For later enhancements and the OMIP locking protocol implementation we need more flexibility. Add a thread priority information block to Scheduler_Node and synchronize priority value updates via a sequence lock on SMP configurations. Update #2556.
* Revert "score: Avoid use of uninitialized variable"Sebastian Huber2016-05-111-1/+0
| | | | | | Sorry, I should not fix warnings unmindfully. This reverts commit 35c8efc9501b5f6b1a4dfeaa4b1aa6a1d6dbf08e.
* score: Avoid use of uninitialized variableSebastian Huber2016-05-111-0/+1
| | | | | Properly set the needs_help to NULL in _Scheduler_SMP_Enqueue_ordered() in case the thread is inserted into the ready set.
* score: Fix scheduler helping protocolSebastian Huber2015-05-111-77/+141
| | | | | | Account for priority changes of threads executing in a foreign partition. Exchange idle threads in case a victim node uses an idle thread and the new scheduled node needs an idle thread.
* smp: Fix scheduler helping protocol assertionsSebastian Huber2014-11-271-3/+5
|
* smp: Fix scheduler helping protocolLuca Bonato2014-11-241-4/+21
| | | | | | | | | | | | New test case for smptests/smpmrsp01. Fix _Scheduler_Block_node() in case the node is in the SCHEDULER_HELP_ACTIVE_RIVAL helping state. For example a rtems_task_suspend() on a task waiting for a MrsP semaphore. Fix _Scheduler_Unblock_node() in case the node is in the SCHEDULER_SMP_NODE_READY state. For example a rtems_task_resume() on a task owning or waiting for a MrsP semaphore.
* score: Fix scheduler helping implementationSebastian Huber2014-07-101-40/+19
| | | | | Do not extract the idle threads from the ready set so that there is always a thread available for comparison.
* score: Fix assertionsSebastian Huber2014-07-101-4/+0
|
* score: Implement scheduler helping protocolSebastian Huber2014-07-091-68/+301
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Need for help indicator for scheduler opsSebastian Huber2014-07-081-28/+54
| | | | | | | | | | | | | Return a thread in need for help for the following scheduler operations - 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.
* score: Add _Scheduler_Help()Sebastian Huber2014-07-081-2/+2
| | | | Manage the help state of threads with respect to scheduling decisions.
* score: Rename *_Node_get() to *_Thread_get_node()Sebastian Huber2014-07-081-6/+6
| | | | | | 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: Simplify SMP processor allocationSebastian Huber2014-07-081-15/+46
| | | | Avoid copy and paste and set the scheduler node state in one place.
* score: Rename _Scheduler_SMP_Update_heir()Sebastian Huber2014-07-081-30/+2
| | | | | | Rename and move _Scheduler_SMP_Update_heir() to _Thread_Dispatch_update_heir() since this function is not scheduler specific.
* score: Fix warningSebastian Huber2014-07-071-1/+1
|
* score: Decouple thread and scheduler nodes on SMPSebastian Huber2014-06-231-107/+146
| | | | | | | 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: Collect scheduler related fields in TCBSebastian Huber2014-06-231-1/+1
| | | | | Add Thread_Scheduler_control to collect scheduler related fields of the TCB.
* score: PR2181: Add _Thread_Yield()Sebastian Huber2014-06-121-0/+21
| | | | | | | | | | | | | | | | | | | The _Scheduler_Yield() was called by the executing thread with thread dispatching disabled and interrupts enabled. The rtems_task_suspend() is explicitly allowed in ISRs: http://rtems.org/onlinedocs/doc-current/share/rtems/html/c_user/Interrupt-Manager-Directives-Allowed-from-an-ISR.html#Interrupt-Manager-Directives-Allowed-from-an-ISR Unlike the other scheduler operations the locking was performed inside the operation. This lead to the following race condition. Suppose a ISR suspends the executing thread right before the yield scheduler operation. Now the executing thread is not longer in the set of ready threads. The typical scheduler operations did not check the thread state and will now extract the thread again and enqueue it. This corrupted data structures. Add _Thread_Yield() and do the scheduler yield operation with interrupts disabled. This has a negligible effect on the interrupt latency.
* score: Move NULL pointer check to order functionSebastian Huber2014-06-121-15/+4
| | | | This helps to avoid untestable code for the normal SMP schedulers.
* score: FormatSebastian Huber2014-06-121-43/+43
|
* score: Add missing inlineSebastian Huber2014-06-121-2/+2
|