summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score/sparc: Add support for paravirtualizationChristian Mauderer2014-06-033-18/+45
| | | | | | | Guest systems in paravirtualization environments run usually in user mode. Thus it is not possible to directly access the PSR and TBR registers. Use functions instead of inline assembler to access these registers if RTEMS_PARAVIRT is defined.
* libblock: Avoid recursive mutexSebastian Huber2014-06-031-9/+10
|
* score: Use Resource Handler for MrsP semaphoresSebastian Huber2014-06-032-35/+112
| | | | | This enables proper resource dependency tracking and as a side-effect deadlock detection.
* score: Add resource node to thread control blockSebastian Huber2014-06-033-0/+20
|
* score: Add and use _Thread_Owns_resources()Sebastian Huber2014-06-035-5/+22
|
* score: Add Resource HandlerSebastian Huber2014-06-035-0/+491
| | | | | | | | | | 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.
* libblock: Add RTEMS_BDBUF_USE_PTHREADRalf Kirchner2014-06-023-72/+230
| | | | | | Use the PTHREAD mutexes and condition variables if available. This helps on SMP configurations to avoid the home grown condition variables via disabled preemption.
* rtems: Avoid copy and paste in confdefs.hRalf Kirchner2014-06-021-32/+48
| | | | | Add and use CONFIGURE_POSIX_MUTEXES. Add and use CONFIGURE_POSIX_CONDITION_VARIABLES.
* arm: Add ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONSSebastian Huber2014-06-022-0/+7
|
* libblock: Use pthread_once() for initializationRalf Kirchner2014-06-021-29/+25
| | | | | | Enabling and disabling preemption as done for single core will not work for SMP. In the bdbuf initialization preemption handling can be avoided in general by using pthread_once().
* score: _Scheduler_Set_affinity()Sebastian Huber2014-06-023-44/+29
| | | | | Do not change the scheduler with this function. Documentation. Coding style.
* score: _Scheduler_Get_affinity()Sebastian Huber2014-06-024-29/+24
| | | | Drop scheduler parameter. Coding style.
* rtems: Coding styleSebastian Huber2014-06-021-19/+15
|
* cpusetimpl.h: Add _CPU_set_Set() and improve DoxygenJoel Sherrill2014-05-301-25/+69
|
* Minor conditionals to enable building Scheduler Simulator on GNU/LinuxJoel Sherrill2014-05-302-5/+25
| | | | | | | | | | | - rtems/score/assert.h: Scheduler Simulator uses glibc assert.h on GNU/Linux. This will likely need to be adjusted more for other host compilers and C libraries. Also disable _Assert_Not_reached() because some of these paths do actually return to the called on the Scheduler Simulator. - basedefs.h: Do not use noreturn attribute when on Scheduler Simulator. Paths which context switch can return to the command interpreter on the Scheduler Simulator.
* rtems/score/thread*.h: Really correct spelling errorJoel Sherrill2014-05-282-3/+3
|
* rtems/score/thread*.h: TERMINTING to TERMINATINGJoel Sherrill2014-05-282-3/+3
|
* shell: Make rtems_global_shell_env publicSebastian Huber2014-05-282-1/+3
| | | | | Provide rtems_global_shell_env as a public read-only variable for backward compatibility.
* score: Multiprocessor Resource Sharing ProtocolSebastian Huber2014-05-2817-11/+758
| | | | | | | | | | | | | | | | | | | | | | 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: Fix race condition in SMP startupSebastian Huber2014-05-262-2/+10
| | | | | | | | | | | | | | Do not use the Per_CPU_Control::started in _SMP_Start_multitasking_on_secondary_processor() since this field may be not up to date when a secondary processor reads it. Use the read-only scheduler assignment instead. Add a new fatal error SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR. This prevents out-of-bounds access. It is currently not possible to test these fatal errors. One option would be to fake values of the _CPU_SMP_Get_current_processor(), but unfortunately this function is inline on some architectures.
* SPARC: add syscall 1 (exit) function entry pointDaniel Hellstrom2014-05-231-0/+25
| | | | | | The exit SPARC system call doesn't have a function entry point like the others do. This is probably why people use TA 0x0 instruction directly for shutting down the system.
* score: Use _SMP_Fatal()Sebastian Huber2014-05-231-1/+1
|
* SMP: make IPI fatal code uniqueDaniel Hellstrom2014-05-231-2/+3
| | | | | | | | | | The same smp fatal code is used in percpu _Per_CPU_State_change(). In order to determine which CPU requested a fatal shutdown and which CPU responds to it a unique code should be used. A unique code makes it also possible to handle the CPUs differently in the fatal exception handler.
* score: PR2179: Fix initially locked PCP mutexesSebastian Huber2014-05-231-3/+16
| | | | | Elevate the priority of the creating task to the ceiling priority in case a semaphore is created as initially locked.
* cpuset.c: Fix formattingJoel Sherrill2014-05-221-3/+3
|
* rtems: Fix sp2038 test.Chris Johns2014-05-221-14/+93
| | | | | | | | Avoid using newlib's gmtime_r call which fails with a max signed int. Add an RTEMS specific version for 1/1/1988 to 31/12/2100. Update sp2038 to test every day from 1/1/1988 to 31/12/2100. Only days need be tested as the code splits the seconds based on days.
* rtems: Simplify rtems_semaphore_obtain()Sebastian Huber2014-05-221-2/+4
|
* schedulersmpimpl.h: Fix spacingJoel Sherrill2014-05-211-2/+2
|
* score: _Thread_Set_life_protection()Sebastian Huber2014-05-211-4/+0
| | | | | | | Enable usage of _Thread_Set_life_protection() in thread dispatch critical sections. This can be used to enable the thread life-protection with thread dispatching disabled and then enable thread dispatching.
* score: Add and use _Scheduler_Get_index_by_id()Sebastian Huber2014-05-211-2/+8
|
* score: Add const qualifierSebastian Huber2014-05-211-1/+1
|
* score: Add comment regarding TLS workspace sizeSebastian Huber2014-05-211-0/+8
|
* score: Simplify _Scheduler_Set()Sebastian Huber2014-05-211-1/+1
|
* rtems: Clarify task set/get scheduler parametersSebastian Huber2014-05-203-10/+10
|
* score: SMP scheduler support documentationSebastian Huber2014-05-201-1/+5
|
* dosfs: Fix read from invalid memory areaSebastian Huber2014-05-161-1/+1
|
* score: Simplify SMP scheduler supportSebastian Huber2014-05-161-8/+3
|
* score: Fix state diagramSebastian Huber2014-05-161-0/+1
|
* score: Split SMP scheduler enqueue functionSebastian Huber2014-05-153-86/+220
| | | | | | | | Extract code from _Scheduler_SMP_Enqueue_ordered() and move it to the new function _Scheduler_SMP_Enqueue_scheduled_ordered() to avoid untestable execution paths. Add and use function _Scheduler_SMP_Unblock().
* score: Make _Thread_queue_Requeue() staticSebastian Huber2014-05-154-76/+48
| | | | | | 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-159-52/+39
|
* score: Add and use _Scheduler_default_Schedule()Sebastian Huber2014-05-158-32/+38
|
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-1542-975/+470
| | | | | | | | | | | | | | | | | | | | | | | | 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: Add and use _Scheduler_Get_context()Sebastian Huber2014-05-147-9/+17
|
* score: _Scheduler_priority_Ready_queue_requeue()Sebastian Huber2014-05-141-22/+0
| | | | Delete unused function _Scheduler_priority_Ready_queue_requeue().
* score: Add STATES_RESTARTINGSebastian Huber2014-05-143-1/+4
| | | | Use separate state for thread restart.
* score: TypoSebastian Huber2014-05-141-1/+1
|
* monitor: Support STATES_MIGRATINGSebastian Huber2014-05-141-0/+1
|
* score: Use Scheduler_Context for SMP schedulerSebastian Huber2014-05-143-73/+88
| | | | | | Use the basic Scheduler_Context for the general SMP scheduler operations to avoid usage of structure offsets to get the specialized context variants.
* score: Capitalize SMP acronymSebastian Huber2014-05-142-50/+50
|