summaryrefslogtreecommitdiffstats
path: root/cpukit/score/Makefile.am (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Replace _API_Mutex_Is_locked()Sebastian Huber2015-05-271-1/+1
| | | | Replace _API_Mutex_Is_locked() with _API_Mutex_Is_owner().
* timecounter: Use in RTEMSAlexander Krutwig2015-05-201-12/+4
| | | | | | | | Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
* timecounter: Port to RTEMSAlexander Krutwig2015-05-201-0/+12
| | | | | | New test sptests/timecounter01. Update #2271.
* score: Replace _Thread_Delay_ended()Sebastian Huber2015-05-191-1/+1
| | | | | | | Use _Thread_Timeout() instead. Use pseudo thread queue for nanosleep() to deal with signals. Close #2130.
* score: Do not inline SMP lock if profiling enabledSebastian Huber2015-05-191-0/+1
| | | | This reduces the code size drastically.
* score: Inline _CORE_semaphore_Surrender()Sebastian Huber2015-05-191-2/+1
|
* score: Inline _CORE_semaphore_Flush()Sebastian Huber2015-05-191-1/+1
|
* score: Delete _CORE_semaphore_Seize()Sebastian Huber2015-05-191-1/+1
| | | | Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
* score: Delete _CORE_message_queue_Flush_support()Sebastian Huber2015-05-191-1/+1
| | | | | Check the number of pending messages in _CORE_message_queue_Flush() to avoid race conditions.
* score: New thread queue implementationSebastian Huber2015-05-191-2/+1
| | | | | | | | | Use thread wait flags for synchronization. The enqueue operation is now part of the initial critical section. This is the key change and enables fine grained locking on SMP for objects using a thread queue like semaphores and message queues. Update #2273.
* score: Add Thread_queue_OperationsSebastian Huber2015-05-191-0/+1
| | | | | | | | Replace the Thread_Priority_control with more general Thread_queue_Operations which will be used for generic priority change, timeout, signal and wait queue operations in the future. Update #2273.
* score: Generalize _Event_Timeout()Sebastian Huber2015-05-191-0/+1
| | | | | | | Add a thread wait timeout code. Replace _Event_Timeout() with a general purpose _Thread_Timeout() watchdog handler. Update #2273.
* score: New timer server implementationSebastian Huber2015-05-191-1/+1
| | | | | | | | Use mostly the standard watchdog operations. Use a system event for synchronization. This implementation is simpler and offers better SMP performance. Close #2131.
* score: Move _Watchdog_Tickle()Sebastian Huber2015-05-191-2/+1
| | | | | | | Make internal function _Watchdog_Remove_it() static to avoid accidental usage. Update #2307.
* score: Delete _CORE_RWLock_Timeout()Sebastian Huber2015-04-221-1/+1
| | | | | This function was identical to _Thread_queue_Timeout(). This makes _Thread_queue_Enqueue_with_handler() obsolete.
* score: Delete object control block ISR lockSebastian Huber2015-04-211-1/+0
| | | | | | | The Objects_Control::Lock was a software layer violation. It worked only for the threads since they are somewhat special. Update #2273.
* score: Refactor SMP cache manager supportSebastian Huber2015-04-201-0/+1
|
* Add test assertion for allocator mutex being unlockedJoel Sherrill2015-04-141-1/+1
| | | | | | | | | | The Allocator Mutex should not be locked outside a tested service call. In an SMP test or heavily multithreaded test, this is possible since another thread could have the lock for an extended period of time but this is not the norm for the tests. updates 2319.
* score: Use _Thread_Clear_state() for _Thread_ReadySebastian Huber2015-04-081-1/+1
|
* score: Move _Watchdog_Ticks_since_boot definitionSebastian Huber2015-04-081-0/+1
|
* score: Move _Thread_queue_Requeue()Sebastian Huber2015-03-221-1/+1
| | | | Now all the main thread queue operations are in one module.
* score: Move _Thread_queue_Extract()Sebastian Huber2015-03-221-2/+2
| | | | | | | | Move _Thread_queue_Dequeue(). We need all or no thread queue functions so it makes no sense to have them in separate modules. One module enables compiler optimizations without link-time optimization. Make _Thread_blocking_operation_Finalize() static since it is use now only in one module.
* score: Move _Thread_blocking_operation_Cancel()Sebastian Huber2015-03-221-2/+1
| | | | | | | Move _Thread_blocking_operation_Cancel() and make static since it is only used by _Thread_queue_Enqueue_with_handler(). Move _Thread_blocking_operation_Finalize().
* score: Delete unused _Timestamp_(To|From)_ticks()Alexander Krutwig2015-03-201-1/+1
|
* score: Delete unused _Timestamp_Divide_by_integerAlexander Krutwig2015-03-201-1/+1
|
* score: Add ISR lock to Objects_ControlSebastian Huber2015-03-051-0/+1
| | | | | | | | | 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: Enable SMP barriers for all configurationsSebastian Huber2015-03-021-1/+1
|
* score: Make <rtems/score/atomic.h> availableSebastian Huber2015-02-191-2/+2
| | | | | | | | Make <rtems/score/atomic.h> available for all RTEMS configurations. Use inline functions instead of macros. Use ISR disable/enable on uni-processor configurations to ensure atomicity. Update #2273.
* score: Rework global constructionSebastian Huber2014-10-131-0/+1
| | | | | | 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.
* Add _TOD_Adjust to SCORE TOD Handler.Joel Sherrill2014-07-231-2/+2
| | | | | | | | 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.
* Thread Queue: Merge discipline subroutines into main methodsJoel Sherrill2014-07-151-7/+3
| | | | | | | | | | | 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.
* score: Implement scheduler helping protocolSebastian Huber2014-07-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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: PR2181: Add _Thread_Yield()Sebastian Huber2014-06-121-0/+1
| | | | | | | | | | | | | | | | | | | 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.
* Add SMP Priority Scheduler with AffinityJoel Sherrill2014-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* score: _Per_CPU_State_wait_for_non_initial_state()Sebastian Huber2014-06-051-0/+1
| | | | | Replace _Per_CPU_State_wait_for_ready_to_start_multitasking() with _Per_CPU_State_wait_for_non_initial_state(). Implement this function.
* score: Replace _Scheduler_Allocate/Free()Sebastian Huber2014-06-041-3/+4
| | | | | | | | Replace _Scheduler_Allocate() with _Scheduler_Node_initialize(). Remove the return status and thus the node initialization must be always successful. Rename _Scheduler_Free() to _Scheduler_Node_destroy().
* score: Add Resource HandlerSebastian Huber2014-06-031-0/+3
| | | | | | | | | | A resource is something that has at most one owner at a time and may have multiple rivals in case an owner is present. The owner and rivals are impersonated via resource nodes. A resource is represented via the resource control structure. The resource controls and nodes are organized as trees. It is possible to detect deadlocks via such a resource tree. The _Resource_Iterate() function can be used to iterate through such a resource tree starting at a top node.
* score: Multiprocessor Resource Sharing ProtocolSebastian Huber2014-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | Add basic support for the Multiprocessor Resource Sharing Protocol (MrsP). The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A. Burns and A.J. Wellings, A Schedulability Compatible Multiprocessor Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro Conference on Real-Time Systems (ECRTS 2013), July 2013. It is a generalization of the Priority Ceiling Protocol to SMP systems. Each MrsP semaphore uses a ceiling priority per scheduler instance. These ceiling priorities can be specified with rtems_semaphore_set_priority(). A task obtaining or owning a MrsP semaphore will execute with the ceiling priority for its scheduler instance as specified by the MrsP semaphore object. Tasks waiting to get ownership of a MrsP semaphore will not relinquish the processor voluntarily. In case the owner of a MrsP semaphore gets preempted it can ask all tasks waiting for this semaphore to help out and temporarily borrow the right to execute on one of their assigned processors. The help out feature is not implemented with this patch.
* score: Make _Thread_queue_Requeue() staticSebastian Huber2014-05-151-1/+1
| | | | | | This function is only used by _Thread_Change_priority(). Make it static to avoid the function call overhead in the performance critical function _Thread_Change_priority().
* score: Add and use _Scheduler_SMP_Start_idle()Sebastian Huber2014-05-151-0/+1
|
* score: Add and use _Scheduler_default_Schedule()Sebastian Huber2014-05-151-0/+1
|
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-151-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
* score: Introduce scheduler nodesSebastian Huber2014-05-141-0/+2
| | | | | | | | | | | | 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: Task get/set affinitySebastian Huber2014-04-151-0/+2
| | | | | Make rtems_task_get_affinity() and rtems_task_set_affinity() available on non-SMP configurations. Allow larger CPU sets.
* score: Simplify thread control initializationSebastian Huber2014-04-151-3/+0
| | | | | | | | | | | The thread control block contains fields that point to application configuration dependent memory areas, like the scheduler information, the API control blocks, the user extension context table, the RTEMS notepads and the Newlib re-entrancy support. Account for these areas in the configuration and avoid extra workspace allocations for these areas. This helps also to avoid heap fragementation and reduces the per thread memory due to a reduced heap allocation overhead.
* score: Add priority affinity smp scheduler.Jennifer Averett2014-04-031-0/+2
|
* score: score: Add get/set affinity to Scheduler Framework.Jennifer Averett2014-04-031-0/+2
|
* score: Move priority bit map to scheduler instanceSebastian Huber2014-04-031-2/+0
| | | | | | Delete global variables _Priority_Major_bit_map and _Priority_Bit_map. This makes it possible to use multiple priority scheduler instances for example with clustered/partitioned scheduling on SMP.
* score: Move __log2table to separate fileSebastian Huber2014-04-011-0/+1
|
* score: Thread life cycle re-implementationSebastian Huber2014-03-311-1/+1
| | | | | | | | | | | | | | | | | | | The thread deletion is now supported on SMP. This change fixes the following PRs: PR1814: SMP race condition between stack free and dispatch PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract() The POSIX cleanup handler are now called in the right context (should be called in the context of the terminating thread). http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html Add a user extension the reflects a thread termination event. This is used to reclaim the Newlib reentrancy structure (may use file operations), the POSIX cleanup handlers and the POSIX key destructors.