summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* documentation: Fix Doxygen commentsSebastian Huber2013-06-149-17/+17
|
* scheduler: New simple SMP scheduler implementationSebastian Huber2013-06-1411-411/+293
| | | | | | | | | | | | | | | | | The new Simple SMP Scheduler allocates a processor for the processor count highest priority ready threads. The thread priority and position in the ready chain are the only information to determine the scheduling decision. Threads with an allocated processor are in the scheduled chain. After initialization the scheduled chain has exactly processor count nodes. Each processor has exactly one allocated thread after initialization. All enqueue and extract operations may exchange threads with the scheduled chain. One thread will be added and another will be removed. The scheduled and ready chain is ordered according to the thread priority order. The chain insert operations are O(count of ready threads), thus this scheduler is unsuitable for most real-time applications. The thread preempt mode will be ignored.
* scheduler: Simplify simple schedulerSebastian Huber2013-06-143-43/+50
| | | | | | | Add and use _Scheduler_simple_Insert_priority_fifo_order(), _Scheduler_simple_Insert_priority_lifo_order(), _Scheduler_simple_Insert_priority_fifo() and _Scheduler_simple_Insert_priority_lifo().
* scheduler: Add and use _Scheduler_default_Tick()Sebastian Huber2013-06-149-139/+32
| | | | | Delete _Scheduler_priority_Tick(). Use _SMP_Get_processor_count() for default tick operation. Delete _Scheduler_simple_smp_Tick().
* scheduler: Specify thread of yield operationSebastian Huber2013-06-149-39/+46
| | | | | | 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.
* scheduler: Add start idle thread operationSebastian Huber2013-06-1411-8/+79
| | | | Add and use _Scheduler_Start_idle().
* score: Simplify _Thread_Create_idle()Sebastian Huber2013-06-141-23/+12
|
* score: Rename rtems_smp_get_number_of_processors()Sebastian Huber2013-06-145-41/+42
| | | | | | | | | Rename in rtems_smp_get_processor_count(). Always provide <rtems/score/smp.h> and <rtems/rtems/smp.h>. Add _SMP_Get_processor_count(). This function will be a compile time constant defined to be one on uni-processor configurations. This allows iterations over all processors without overhead on uni-processor configurations.
* score: Add and use _Thread_Dispatch_if_necessary()Sebastian Huber2013-06-141-26/+26
| | | | | | | | | Delete _Thread_Evaluate_is_dispatch_needed(). Use _Thread_Dispatch_is_enabled() in rtems_task_mode() instead of the system state to determine if a thread dispatch is allowed. Signales are now delivered in rtems_task_mode() even if preemption is disabled. This is in line with rtems_signal_send().
* score: Add and use _Thread_Dispatch_is_enabled()Sebastian Huber2013-06-147-45/+18
| | | | | Delete _Thread_Dispatch_in_critical_section() and _Thread_Is_dispatching_enabled().
* score: Add _Chain_Insert_ordered_unprotected()Sebastian Huber2013-06-141-0/+41
|
* smp: Fix _Thread_Dispatch_decrement_disable_levelSebastian Huber2013-06-121-1/+7
| | | | | | We must obtain the processor ID after interrupts are disabled since a non-optimizing compiler may store the value on the stack and read it back.
* smp: Protect decrement operationSebastian Huber2013-06-121-4/+4
|
* smp: Add and use _Per_CPU_Lock_acquire()Sebastian Huber2013-06-122-6/+12
| | | | Add and use _Per_CPU_Lock_release().
* score: Avoid cyclic include dependencySebastian Huber2013-06-121-1/+2
|
* score: Add missing includeSebastian Huber2013-06-121-0/+1
|
* score: Always provide <rtems/score/smplock.h>Sebastian Huber2013-06-124-8/+12
|
* smp: Set state PER_CPU_STATE_UP on main processorSebastian Huber2013-06-071-4/+6
|
* score: Add and use _Objects_Put()Sebastian Huber2013-06-0711-41/+74
| | | | | | Add and use _Objects_Put_without_thread_dispatch(). These two functions pair with the _Objects_Get() function. This helps to introduce object specific SMP locks to avoid lock contention.
* score: Add _Objects_Put_for_get_isr_disable()Sebastian Huber2013-06-072-0/+20
| | | | | Provide SMP support. The ISR disable/enable is not enough to ensure mutual exclusion for SMP configurations.
* score: Align _Objects_Get_isr_disable()Sebastian Huber2013-06-071-2/+1
| | | | | Align ISR disable/enable sequence in _Objects_Get_isr_disable() with thread dispatch disable/enable sequence in _Objects_Get().
* score: Move thread dispatch content to new fileSebastian Huber2013-06-0725-247/+291
| | | | | | | Move thread dispatch declarations and inline functions to new header <rtems/score/threaddispatch.h> to make it independent of the Thread_Control structure. This avoids a cyclic dependency in case thread dispatch functions are used for the object implementation.
* score: Simplify _CORE_mutex_Seize_interrupt_try*Sebastian Huber2013-06-073-17/+17
|
* score: Simplify _CORE_semaphore_Seize_isr_disableSebastian Huber2013-06-071-5/+5
|
* score: Simplify _Thread_Create_idle_helper()Sebastian Huber2013-06-071-9/+0
| | | | | The _Thread_Initialize() function has nothing to do with thread dispatching it simply initializes the thread control.
* smp: Add ARM supportSebastian Huber2013-05-316-2/+180
|
* smp: Add PowerPC supportSebastian Huber2013-05-314-1/+116
|
* smp: New SMP lock APISebastian Huber2013-05-3118-463/+470
| | | | | | | | | | | | | | Move the SMP lock implementation to the CPU port. An optimal SMP lock implementation is highly architecture dependent. For example the memory models may be fundamentally different. The new SMP lock API has a flaw. It does not provide the ability to use a local context for acquire and release pairs. Such a context is necessary to implement for example the Mellor-Crummey and Scott (MCS) locks. The SMP lock is currently used in _Thread_Disable_dispatch() and _Thread_Enable_dispatch() and makes them to a giant lock acquire and release. Since these functions do not pass state information via a local context there is currently no use case for such a feature.
* score: Mark as no returnSebastian Huber2013-05-311-5/+7
| | | | Mark rtems_smp_secondary_cpu_initialize() as no return.
* score: Remove idle field of Per_CPU_ControlSebastian Huber2013-05-313-10/+24
| | | | | | This field is unused except for special case simulator clock drivers. In these places use an alternative. Add and use _Thread_Set_global_exit_status() and _Thread_Get_global_exit_status().
* smp: Move secondary CPU initialization requestSebastian Huber2013-05-291-6/+0
| | | | | Do not assume that the scheduler selects the main processor for the initialization thread.
* smp: Use _CPU_Fatal_halt()Sebastian Huber2013-05-291-2/+2
|
* smp: Simplify SMP initialization sequenceSebastian Huber2013-05-298-189/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete bsp_smp_wait_for(). Other parts of the system work without timeout, e.g. the spinlocks. Using a timeout here does not make the system more robust. Delete bsp_smp_cpu_state and replace it with Per_CPU_State. The Per_CPU_State follows the Score naming conventions. Add _Per_CPU_Change_state() and _Per_CPU_Wait_for_state() functions to change and observe states. Use Per_CPU_State in Per_CPU_Control instead of the anonymous integer. Add _CPU_Processor_event_broadcast() and _CPU_Processor_event_receive() functions provided by the CPU port. Use these functions in _Per_CPU_Change_state() and _Per_CPU_Wait_for_state(). Add prototype for _SMP_Send_message(). Delete RTEMS_BSP_SMP_FIRST_TASK message. The first context switch is now performed in rtems_smp_secondary_cpu_initialize(). Issuing the first context switch in the context of the inter-processor interrupt is not possible on systems with a modern interrupt controller. Such an interrupt controler usually requires a handshake protocol with interrupt acknowledge and end of interrupt signals. A direct context switch in an interrupt handler circumvents the interrupt processing epilogue and may leave the system in an inconsistent state. Release lock in rtems_smp_process_interrupt() even if no message was delivered. This prevents deadlock of the system. Simplify and format _SMP_Send_message(), _SMP_Request_other_cores_to_perform_first_context_switch(), _SMP_Request_other_cores_to_dispatch() and _SMP_Request_other_cores_to_shutdown().
* smp: Delete bsp_smp_secondary_cpu_initialize()Sebastian Huber2013-05-292-21/+19
| | | | | | | Do not call bsp_smp_secondary_cpu_initialize() in rtems_smp_secondary_cpu_initialize(). This allows more flexibilty in the BSP low-level code. Specify context requirements for a call to rtems_smp_secondary_cpu_initialize().
* smp: Delete rtems_smp_send_message()Sebastian Huber2013-05-291-15/+0
|
* smp: Delete rtems_smp_initialize_per_cpu()Sebastian Huber2013-05-291-10/+0
|
* smp: Simplify main CPU initializationSebastian Huber2013-05-292-12/+23
| | | | | | Call _SMP_Handler_initialize() later and move bsp_smp_initialize() into _SMP_Handler_initialize(). Change bsp_smp_initialize() prototype to match integer types of calling context.
* smp: Make CPU_ALLOCATE_INTERRUPT_STACK optionalSebastian Huber2013-05-292-13/+13
|
* smp: Rely on BSS initializationSebastian Huber2013-05-291-5/+0
| | | | | | The _Per_CPU_Information is part of the BSS segment and must be zero initialized. Some processors may already poll some per-CPU fields and wait for a state change at this point.
* smp: Include missing headerSebastian Huber2013-05-291-0/+2
|
* arm: Add CPU specific idle thread for ARMv7Sebastian Huber2013-05-274-4/+10
|
* arm: Fix CPSR and SPSR accessSebastian Huber2013-05-272-8/+8
| | | | | | | | | | | | | | | The GNU assembler translates for example a msr spsr, rN into msr SPSR_fc, rN This would update only a subset of the register and leads to an incomplete exceptions restore sequence resulting in system corruption. Correct is this: msr SPSR_fsxc, rN
* score: use reference with strict mutexGedare Bloom2013-05-181-1/+1
|
* smp: Add maximum_processors field to configSebastian Huber2013-05-163-10/+2
| | | | | | | Delete rtems_configuration_get_smp_maximum_processors(). Delete rtems_configuration_smp_maximum_processors variable. Add maximum_processors field to rtems_configuration_table if RTEMS_SMP is defined. Add rtems_configuration_get_maximum_processors().
* arm: Support VFP-D32 and NeonSebastian Huber2013-05-109-38/+393
|
* arm: Simplify architecture selectionSebastian Huber2013-05-101-63/+5
|
* score: Add CPU context validationSebastian Huber2013-05-1027-0/+889
|
* arm: Add FUNCTION_THUMB_ENTRY(), etc.Sebastian Huber2013-05-101-0/+17
| | | | Add FUNCTION_THUMB_ENTRY(), FUNCTION_ENTRY() and FUNCTION_END().
* Revert bootstrap whitespace changes.Chris Johns2013-05-1014-0/+14
|
* sparc: Fix problem with assembler filesSebastian Huber2013-05-071-1/+1
|