summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/scheduleredfyield.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Improve scheduler helping protocolSebastian Huber2017-02-031-3/+1
| | | | | | | | | | | 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: Simplify yield and unblock scheduler opsSebastian Huber2016-11-021-2/+2
| | | | Update #2556.
* score: Pass scheduler node to yield operationSebastian Huber2016-11-021-5/+6
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix _Scheduler_EDF_Yield()Sebastian Huber2016-06-241-1/+1
| | | | A non-preemptive task must yield if it says so.
* score: Rework EDF schedulerSebastian Huber2016-06-221-14/+6
| | | | | | | | | Use inline red-black tree insert. Do not use shifting priorities since this is not supported by the thread queues. Due to the 32-bit Priority_Control this currently limits the uptime to 49days with a 1ms clock tick. Update #2173.
* rbtree: Reduce RBTree_Control sizeSebastian Huber2014-07-151-1/+6
| | | | | | | | | | | | Remove compare function and is unique indicator from the control structure. Rename RBTree_Compare_function to RBTree_Compare. Rename rtems_rbtree_compare_function to rtems_rbtree_compare. Provide C++ compatible initializers. Add compare function and is unique indicator to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and rtems_rbtree_insert(). Remove _RBTree_Is_unique() and rtems_rbtree_is_unique(). Remove compare function and is unique indicator from _RBTree_Initialize_empty() and rtems_rbtree_initialize_empty().
* score: Need for help indicator for scheduler opsSebastian Huber2014-07-081-1/+3
| | | | | | | | | | | | | 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: Rename *_Node_get() to *_Thread_get_node()Sebastian Huber2014-07-081-1/+1
| | | | | | 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: PR2181: Add _Thread_Yield()Sebastian Huber2014-06-121-7/+0
| | | | | | | | | | | | | | | | | | | 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: Introduce scheduler nodesSebastian Huber2014-05-141-6/+3
| | | | | | | | | | | | Rename scheduler per-thread information into scheduler nodes using Scheduler_Node as the base type. Use inheritance for specialized schedulers. Move the scheduler specific states from the thread control block into the scheduler node structure. Validate the SMP scheduler node state transitions in case RTEMS_DEBUG is defined.
* score: Static scheduler configurationSebastian Huber2014-04-151-7/+7
| | | | | | Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
* score: Add scheduler control to scheduler opsSebastian Huber2014-04-041-4/+7
| | | | | Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
* score: Add and use Scheduler_EDF_ControlSebastian Huber2014-04-041-3/+5
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score/rbtree: Remove "unprotected" from APISebastian Huber2013-11-211-2/+2
|
* scheduler/EDF: Use unprotected insert and extractSebastian Huber2013-11-211-2/+2
| | | | | | Interrupts are disabled by the caller _Thread_Change_priority() or _Thread_Set_transient() or directly in the scheduler operation. Thus there is no need to use protected variants.
* score: PR2136: Fix _Thread_Change_priority()Sebastian Huber2013-08-201-7/+2
| | | | | | | | | | | | | | | Add call to _Scheduler_Schedule() in missing path after _Thread_Set_transient() in _Thread_Change_priority(). See also sptests/spintrcritical19. Add thread parameter to _Scheduler_Schedule(). This parameter is currently unused but may be used in future SMP schedulers. Do heir selection in _Scheduler_Schedule(). Use _Scheduler_Update_heir() for this in the particular scheduler implementation. Add and use _Scheduler_Generic_block().
* scheduler: Specify thread of yield operationSebastian Huber2013-06-141-7/+6
| | | | | | The yielding thread of the yield operation is now specified by a parameter. The tick operation may be performed for each executing thread in a SMP configuration.
* score misc: Score misc: Clean up Doxygen #10 (GCI 2012)Christopher Kerl2012-12-011-0/+8
| | | | | | | This patch is a task from GCI 2012 which improves the Doxygen comments in the RTEMS source. http://www.google-melange.com/gci/task/view/google/gci2012/7983216
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* 2011-09-20 Petr Benes <benesp16@fel.cvut.cz>Joel Sherrill2011-09-201-22/+11
| | | | | | | PR 1916/testing * rtems/src/ratemondelete.c, score/src/schedulercbsreleasejob.c, score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: Rework to improve coverage.
* 2011-09-11 Petr Benes <benesp16@fel.cvut.cz>Joel Sherrill2011-09-111-0/+57
PR 1896/cpukit * sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add Earliest Deadline First (EDF) Scheduling Algorithm implementation. * score/include/rtems/score/scheduleredf.h, score/src/scheduleredf.c, score/src/scheduleredfallocate.c, score/src/scheduleredfblock.c, score/src/scheduleredfenqueue.c, score/src/scheduleredfenqueuefirst.c, score/src/scheduleredfextract.c, score/src/scheduleredffree.c, score/src/scheduleredfprioritycompare.c, score/src/scheduleredfreleasejob.c, score/src/scheduleredfschedule.c, score/src/scheduleredfunblock.c, score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: New files.