summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add thread wait flagsSebastian Huber2015-03-051-0/+2
| | | | Update #2273.
* score: Add thread acquireSebastian Huber2015-03-051-24/+61
| | | | Update #2273.
* score: Add ISR lock to Objects_ControlSebastian Huber2015-03-052-0/+82
| | | | | | | | | This enables per-object SMP locks on SMP configurations and is the first step to support fine-grained locking. On uni-processor configuration there will be no overhead. The _Objects_Acquire() is intended to replace _Objects_Get_isr_disable(). Update #2273.
* score: Add and use _Thread_Do_dispatch()Sebastian Huber2015-03-052-69/+65
| | | | | | | | | | | | The _Thread_Dispatch() function is quite complex and the time to set up and tear down the stack frame is significant. Split this function into two parts. The complex part is now in _Thread_Do_dispatch(). Call _Thread_Do_dispatch() in _Thread_Enable_dispatch() only if necessary. This increases the average case performance. Simplify _Thread_Handler() for SMP configurations. Update #2273.
* score: Simplify and fix signal deliverySebastian Huber2015-03-051-1/+0
| | | | | | | Deliver the POSIX signals after the thread state was updated to avoid race-conditions on SMP configurations. Update #2273.
* score: Update _Thread_Heir only if necessarySebastian Huber2015-03-059-34/+25
| | | | | | | | | | | | | | | | | | | | Previously, the _Thread_Heir was updated unconditionally in case a new heir was determined. The _Thread_Dispatch_necessary was only updated in case the executing thread was preemptible or an internal thread was unblocked. Change this to update the _Thread_Heir and _Thread_Dispatch_necessary only in case the currently selected heir thread is preemptible or a dispatch is forced. Move the schedule decision into the change priority operation and use the schedule operation only in rtems_task_mode() in case preemption is enabled or an ASR dispatch is necessary. This is a behaviour change. Previously, the RTEMS_NO_PREEMPT also prevented signal delivery in certain cases (not always). Now, signal delivery is no longer influenced by RTEMS_NO_PREEMPT. Since the currently selected heir thread is used to determine if a new heir is chosen, non-preemptible heir threads currently not executing now prevent a new heir. This may have an application impact, see change test tm04. Document this change in sp04. Update #2273.
* score: Add and use PRIORITY_PSEUDO_ISRSebastian Huber2015-03-051-1/+1
|
* score: Add and use _Thread_Enable_dispatch_body()Sebastian Huber2015-03-041-3/+1
| | | | Update #2273.
* score: Add parameter to Giant acquire/releaseSebastian Huber2015-03-041-4/+4
| | | | Update #2273.
* score: Fix _Thread_Start_multitasking() on SMPSebastian Huber2015-02-171-11/+13
| | | | Close #2268.
* score: Fix FP context restore via _Thread_HandlerSebastian Huber2015-02-173-68/+3
| | | | | | | | | | After a context switch we end up in the second part of _Thread_Dispatch() or in _Thread_Handler() in case of new threads. Use the same function _Thread_Restore_fp() to restore the floating-point context. It makes no sense to do this in _Thread_Start_multitasking(). This fixes also a race condition in SMP configurations. Update #2268.
* score: Add _CPU_SMP_Prepare_start_multitasking()Sebastian Huber2015-02-171-0/+2
| | | | Update #2268.
* score: Mention ticket in commentSebastian Huber2015-02-131-1/+1
|
* score: Delete superfluous Heap_Statistics::instanceSebastian Huber2015-01-221-3/+0
| | | | | This value depends on the _Heap_Initialize() call sequence and carries no useful information.
* smp: Add and use _SMP_Should_start_processor()Sebastian Huber2015-01-091-3/+9
|
* score: Add heap statisticsSebastian Huber2014-11-282-4/+9
| | | | | Add lifetime bytes allocated and freed since they were present in the malloc statistics. Add number of failed allocations.
* score: Return heap stats via _Heap_Get_informationSebastian Huber2014-11-281-0/+1
| | | | Print out heap statistics via the MALLOC and WKSPACE shell commands.
* objectgetnameasstring.c: Reformat _Objects_Get() switch to follow patternJosh Oguin2014-11-261-7/+8
|
* apimutex.c: Add _Assert for NULL pointer accessJosh Oguin2014-11-261-0/+2
| | | | | | | CodeSonar detects a possible NULL deference here. But it should never occur in tested code. Memory for the API Mutexes is reserved by confdefs.h and are all preallocated when the class of objects is initialized. Allocating a single instance should never fail.
* _Scheduler_FIXME_thread_priority_queues_are_brokenSebastian Huber2014-11-241-4/+0
| | | | | Delete this variable since it is no longer necessary due to the thread priority queue implementation change to use RB trees.
* objectsetname.c: Fix always true condition (Coverity ID 1063874)Joel Sherrill2014-11-211-5/+5
| | | | | Coverity spotted the comparison (0 <= length) which is always true. Changed logic to address this.
* score: Add capture data to tcb.Jennifer Averett2014-10-271-0/+3
|
* score: Fix compile error for POSIX disabledSebastian Huber2014-10-161-2/+1
|
* score: Rework global constructionSebastian Huber2014-10-132-82/+96
| | | | | | Ensure that the global construction is performed in the context of the first initialization thread. On SMP this was not guaranteed in the previous implementation.
* cpukit/score/src/ts64*: Return a value from non-void functionJoel Sherrill2014-10-094-4/+4
|
* score: Critical fix for _Thread_queue_Dequeue()Sebastian Huber2014-09-191-6/+8
| | | | | Do not return NULL in case we can dequeue the executing thread. This bug was introduced with 32506647001a815e3c0daf25757d386104a07184.
* Let CPU/BSP Fatal handler have access to sourceDaniel Hellstrom2014-09-101-1/+1
| | | | | | | | | Without the source the error code does not say that much. Let it be up to the CPU/BSP to determine the error code reported on fatal shutdown. This patch does not change the current behaviour, just adds the option to handle the source of the fatal halt.
* score: Rename SMP broadcast message functionDaniel Cederman2014-08-221-1/+1
| | | | Change message type to unsigned long to match other SMP message functions.
* score: Add function to send a SMP message to a set of CPUsDaniel Cederman2014-08-221-0/+16
|
* score: PR2179: Fix initially locked PI mutexSebastian Huber2014-08-201-4/+11
|
* rbtree: Simplify _RBTree_Extract()Sebastian Huber2014-08-071-8/+10
|
* rbtree: Simplify insert and extractSebastian Huber2014-08-072-25/+39
| | | | | | | Simplify _RBTree_Insert() and _RBTree_Extract(). Remove more superfluous NULL pointer checks. Change _RBTree_Is_root() to use only the node. Add parent parameter to _RBTree_Sibling(). Delete _RBTree_Grandparent() and _RBTree_Parent_sibling().
* rbtree: Add and use RBTree_Compare_resultSebastian Huber2014-08-054-5/+16
|
* Add and use RTEMS_CONTAINER_OF()Sebastian Huber2014-08-056-18/+19
|
* rbtree: Update maximum node in LIFO orderSebastian Huber2014-07-261-2/+2
| | | | | | The test sptests/sp35 showed a NULL pointer access due to an invalid maximum node field (e.g. a tree with one element and NULL as the maximum node).
* coretod*.c: Fix Doxygen group and comment formattingJoel Sherrill2014-07-235-14/+14
|
* Add _TOD_Adjust to SCORE TOD Handler.Joel Sherrill2014-07-231-0/+51
| | | | | | | | This lays the proper structure for doing future work on time adjustment algorithms. Any TOD adjustments should be requested at the API level and performed at the SCORE level. Additionally updated a test.
* rbtree: Do not set node off-tree in extractSebastian Huber2014-07-221-3/+0
|
* rbtree: Remove superfluous NULL pointer checksSebastian Huber2014-07-223-19/+0
|
* rbtree: FormatSebastian Huber2014-07-226-117/+147
|
* Use Shared Method for Thread Unblock CleanupJoel Sherrill2014-07-153-60/+45
| | | | | | | | | | | When a thread is removed from a thread queue or is unblocked by receiving an event, the same actions are required. + timeout watchdog canceled, + thread must be unblocked, and + (MP only) proxy cleaned up This patch makes sure there is only one copy of this code.
* Thread Queue: Merge discipline subroutines into main methodsJoel Sherrill2014-07-1514-539/+216
| | | | | | | | | | | There was a lot of duplication between the discipline subroutines. With the transition to RBTrees for priority discipline, there were only a few lines of source code manipulating the data structure for FIFO and priority. Thus is made sense to fold these back into the main methods. As part of doing this all of the tests for discipline were changed to be in the same order.
* Thread Queue Priority Discipline Reimplemented with RBTreeJoel Sherrill2014-07-156-259/+69
|
* rbtree: Reduce RBTree_Control sizeSebastian Huber2014-07-156-51/+45
| | | | | | | | | | | | 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().
* scheduleredfunblock.c: Correct spacingJoel Sherrill2014-07-141-1/+1
|
* score: Scheduler helping proto for affinity schedSebastian Huber2014-07-111-0/+12
| | | | | | | | | | | The priority affinity scheduler has the nice property that it can produce more than one scheduled to ready state change in one operation. Each scheduled to ready state change may lead to one thread in need for help. Since it is currently only possible to return at most one thread in need for help, we have a problem here. A solution might be to move the check for migrations into the ask for help mechanism.
* score: Fix scheduler helping implementationSebastian Huber2014-07-103-57/+16
| | | | | 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-1/+4
|
* score: Implement scheduler helping protocolSebastian Huber2014-07-0911-22/+266
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* schedulerpriorityaffinitysmp.c: Add period at end of sentenceJoel Sherrill2014-07-081-1/+1
|