summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Optimize context switchSebastian Huber2014-04-282-51/+48
| | | | | | The registers g2 through g4 are reserved for applications. GCC uses them as volatile registers by default. So they are treated like volatile registers in RTEMS as well.
* score: Add _CPU_Get_current_per_CPU_control()Sebastian Huber2014-04-282-3/+25
| | | | | | | | | Add optional method _CPU_Get_current_per_CPU_control() to obtain the per-CPU control of the current processor. This is optional. Not every CPU port needs this. It is only an optional optimization variant. In case this macro is undefined, the default implementation using the current processor index will be used.
* mpci.c: Now compiles againJoel Sherrill2014-04-221-1/+3
|
* score: Use common names for per-CPU variablesSebastian Huber2014-04-2214-177/+177
| | | | | | | | | | | | | | | | Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
* score: Fix warningSebastian Huber2014-04-221-2/+0
|
* score: Delete superfluous assignmentsSebastian Huber2014-04-221-7/+0
| | | | These values are already zero initialized by C run-time setup.
* score: Simplify Giant lockSebastian Huber2014-04-221-9/+7
|
* score: Use _Per_CPU_Get_snapshot()Sebastian Huber2014-04-221-1/+1
|
* score: Clarify TLS supportSebastian Huber2014-04-174-5/+5
|
* score: DocumentationSebastian Huber2014-04-161-0/+5
|
* score: Critical fix for SMPSebastian Huber2014-04-163-18/+21
| | | | | | The _Scheduler_SMP_Allocate_processor() and _Thread_Dispatch() exchange information without locks. Make sure we use the right load/store ordering.
* score: Add clustered/partitioned schedulingSebastian Huber2014-04-1513-86/+342
| | | | | | | | | | | | | | | Clustered/partitioned scheduling helps to control the worst-case latencies in the system. The goal is to reduce the amount of shared state in the system and thus prevention of lock contention. Modern multi-processor systems tend to have several layers of data and instruction caches. With clustered/partitioned scheduling it is possible to honour the cache topology of a system and thus avoid expensive cache synchronization traffic. We have clustered scheduling in case the set of processors of a system is partitioned into non-empty pairwise-disjoint subsets. These subsets are called clusters. Clusters with a cardinality of one are partitions. Each cluster is owned by exactly one scheduler instance.
* rtems: Add task get/set schedulerSebastian Huber2014-04-151-0/+25
|
* rtems: Add scheduler get processorsSebastian Huber2014-04-151-0/+13
|
* rtems: Add scheduler identificationSebastian Huber2014-04-153-1/+21
|
* score: Add scheduler nameSebastian Huber2014-04-151-0/+5
|
* score: Task get/set affinitySebastian Huber2014-04-157-59/+215
| | | | | 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-1519-244/+115
| | | | | | | | | | | 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: Static scheduler configurationSebastian Huber2014-04-1575-604/+631
| | | | | | 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 and use RTEMS_ZERO_LENGTH_ARRAYSebastian Huber2014-04-151-0/+7
|
* score: SMP initialization changesSebastian Huber2014-04-147-19/+85
| | | | | | | | | | | | | | | | | Add and use _CPU_SMP_Start_processor(). Add and use _CPU_SMP_Finalize_initialization(). This makes most _CPU_SMP_Initialize() functions a bit simpler since we can calculate the minimum value of the count of processors requested by the application configuration and the count of physically or virtually available processors in the high-level code. The CPU port has now the ability to signal a processor start failure. With the support for clustered/partitioned scheduling the presence of particular processors can be configured to be optional or mandatory. There will be a fatal error only in case mandatory processors are not present. The CPU port may use a timeout to monitor the start of a processor.
* score: Add _Per_CPU_Get_snapshot()Sebastian Huber2014-04-141-3/+12
|
* sparc: Use __leon__ multilib defineSebastian Huber2014-04-141-1/+8
|
* score: Fix workspace size estimate for TLSSebastian Huber2014-04-093-4/+17
|
* score: Fix for empty heapSebastian Huber2014-04-071-1/+6
|
* score: Delete _Thread_Ticks_per_timesliceSebastian Huber2014-04-075-10/+7
| | | | Use the Configuration instead.
* score: Delete _Thread_Maximum_extensionsSebastian Huber2014-04-073-18/+6
| | | | Use the Configuration instead.
* score: Clarify CPU port alignment requirementsSebastian Huber2014-04-072-9/+42
|
* Disable per task variables when SMP is enabledJoel Sherrill2014-04-041-0/+4
| | | | | | Per task variables are inherently unsafe in SMP systems. This patch disables them from the build and adds warnings in the appropriate documentation and configuration sections.
* schedulerpriorityaffinitysmp.h: Fix compilation error introduced by recent ↵Joel Sherrill2014-04-041-2/+6
| | | | changes
* score: Add scheduler control to scheduler opsSebastian Huber2014-04-0468-350/+696
| | | | | Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
* score: Add and use Scheduler_simple_ControlSebastian Huber2014-04-045-17/+27
|
* score: Add and use Scheduler_EDF_ControlSebastian Huber2014-04-046-27/+39
|
* score: Delete superfluous fieldSebastian Huber2014-04-041-5/+0
|
* score: Include missing header fileSebastian Huber2014-04-041-5/+8
|
* score: Move declaration to end of fileSebastian Huber2014-04-041-7/+6
|
* score: Remove affinity element from thread.Jennifer Averett2014-04-032-14/+0
|
* score: Add priority affinity smp scheduler.Jennifer Averett2014-04-034-0/+230
|
* score: score: Add get/set affinity to Scheduler Framework.Jennifer Averett2014-04-0310-11/+192
|
* score: Move priority bit map to scheduler instanceSebastian Huber2014-04-0320-251/+330
| | | | | | 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: Rename Priority_bit_map_ControlSebastian Huber2014-04-0332-58/+58
| | | | Rename Priority_bit_map_Control in Priority_bit_map_Word.
* score: PR788: Add INTERNAL_ERROR_RESOURCE_IN_USESebastian Huber2014-04-032-1/+10
| | | | | | | | | | | | | | | Issue a fatal error in case a thread is deleted which still owns resources (e.g. a binary semaphore with priority inheritance or ceiling protocol). The resource count must be checked quite late since RTEMS task variable destructors, POSIX key destructors, POSIX cleanup handler, the Newlib thread termination extension or other thread termination extensions may release resources. In this context it would be quite difficult to return an error status to the caller. An alternative would be to place threads with a non-zero resource count not on the zombie chain. Thus we have a resource leak instead of a fatal error. The terminator thread can see this error if we return an RTEMS_RESOURCE_IN_USE status for the rtems_task_delete() for example.
* score: Move __log2table to separate fileSebastian Huber2014-04-013-21/+44
|
* score: PR2172: _Thread_queue_Extract()Sebastian Huber2014-04-016-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add _Thread_queue_Extract_with_return_code(). On SMP this sequence in _Thread_queue_Process_timeout() was broken: [...] /* * After we enable interrupts here, a lot may happen in the * meantime, e.g. nested interrupts may release the resource that * times out here. So we enter _Thread_queue_Extract() * speculatively. Inside this function we check the actual status * under ISR disable protection. This ensures that exactly one * executing context performs the extract operation (other parties * may call _Thread_queue_Dequeue()). If this context won, then * we have a timeout. * * We can use the_thread_queue pointer here even if * the_thread->Wait.queue is already set to NULL since the extract * operation will only use the thread queue discipline to select * the right extract operation. The timeout status is set during * thread queue initialization. */ we_did_it = _Thread_queue_Extract( the_thread_queue, the_thread ); if ( we_did_it ) { the_thread->Wait.return_code = the_thread_queue->timeout_status; } [...] In case _Thread_queue_Extract() successfully extracted a thread, then this thread may start execution on a remote processor immediately and read the the_thread->Wait.return_code before we update it here with the timeout status. Thus it observes a successful operation even if it timed out.
* score: _Thread_queue_Extract_with_proxy()Sebastian Huber2014-03-312-5/+3
| | | | Drop the return status, since it is nowhere used.
* score: Delete CORE_mutex_Control::lockSebastian Huber2014-03-315-24/+9
| | | | | | | | The holder field is enough to determine if a mutex is locked or not. This leads also to better error status codes in case a rtems_semaphore_release() is done for a mutex without having the ownership.
* score: Delete CORE_mutex_Control::holder_idSebastian Huber2014-03-314-9/+1
| | | | We can use the holder pointer to get the identifier if necessary.
* score: Delete CORE_mutex_Control::blocked_countSebastian Huber2014-03-313-4/+0
|
* score: Do not reset resource count during restartSebastian Huber2014-03-311-1/+0
| | | | | | | This fixes an integer underflow problem in case resources are released after a thread restart. Add new test sptests/spthreadlife01.
* score: PR2152: Use allocator mutex for objectsSebastian Huber2014-03-318-49/+204
| | | | | Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.