summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* rtems: Clarify task set/get scheduler parametersSebastian Huber2014-05-203-10/+10
|
* rtems: Move extern "C" in <rtems.h>Sebastian Huber2014-05-121-4/+4
| | | | Do not cover the includes with an extern "C".
* rtems: Fix ASR SMP supportSebastian Huber2014-05-072-3/+24
| | | | Initialize the ISR lock only once and destroy it properly.
* score: Implement forced thread migrationSebastian Huber2014-05-072-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
* score: DocumentationSebastian Huber2014-05-071-2/+6
|
* score: SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORSSebastian Huber2014-05-052-3/+11
| | | | | Avoid the SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS fatal error and make it a run-time error in rtems_scheduler_ident() and _Scheduler_Get_by_id().
* doc: rtems_task_set_scheduler()Sebastian Huber2014-04-171-0/+3
|
* doc: rtems_get_processor_count()Sebastian Huber2014-04-171-8/+5
|
* rtems: Add const qualifierSebastian Huber2014-04-162-6/+6
|
* score: Add clustered/partitioned schedulingSebastian Huber2014-04-153-2/+3
| | | | | | | | | | | | | | | 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-154-0/+155
|
* rtems: Add scheduler get processorsSebastian Huber2014-04-153-0/+79
|
* rtems: Add scheduler identificationSebastian Huber2014-04-153-0/+64
|
* score: Task get/set affinitySebastian Huber2014-04-152-31/+28
| | | | | 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-152-37/+5
| | | | | | | | | | | 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.
* rtems: Rename rtems_smp_get_current_processor()Sebastian Huber2014-04-113-6/+30
| | | | | | | Rename rtems_smp_get_current_processor() in rtems_get_current_processor(). Make rtems_get_current_processor() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* rtems: Rename rtems_smp_get_processor_count()Sebastian Huber2014-04-113-4/+29
| | | | | | Rename rtems_smp_get_processor_count() in rtems_get_processor_count(). Make rtems_get_processor_count() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* score: Use proper protectionSebastian Huber2014-04-071-6/+7
|
* score: Delete _Thread_Ticks_per_timesliceSebastian Huber2014-04-071-1/+2
| | | | Use the Configuration instead.
* Disable per task variables when SMP is enabledJoel Sherrill2014-04-049-24/+60
| | | | | | 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.
* score: Add scheduler control to scheduler opsSebastian Huber2014-04-047-16/+37
| | | | | Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
* rtems: Move affinity from thread to scheduler.Jennifer Averett2014-04-032-9/+9
|
* score: Delete CORE_mutex_Control::lockSebastian Huber2014-03-311-1/+1
| | | | | | | | 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: PR2152: Use allocator mutex for objectsSebastian Huber2014-03-3124-125/+91
| | | | | Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
* score: Thread life cycle re-implementationSebastian Huber2014-03-314-41/+30
| | | | | | | | | | | | | | | | | | | 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.
* score: Add parameter to _Thread_Restart()Sebastian Huber2014-03-311-1/+1
| | | | | The executing thread will be later used for a common implementation with _Thread_Close().
* score: Use thread action for thread restartSebastian Huber2014-03-311-9/+1
| | | | | The thread restart is now supported on SMP. New test smptests/smpthreadlife01.
* rtems: Use thread action for signalsSebastian Huber2014-03-316-10/+36
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-21219-219/+219
|
* rtems: Include missing header fileSebastian Huber2014-03-181-1/+2
|
* score: Add SMP lock profiling supportSebastian Huber2014-03-142-4/+6
|
* score: Add function to destroy SMP locksSebastian Huber2014-03-111-0/+10
|
* score: Add local context to SMP lock APISebastian Huber2014-03-114-25/+36
| | | | | | | | | | | Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
* POSIX keys now enabled in all configurations.Joel Sherrill2014-03-071-1/+6
| | | | | | | Formerly POSIX keys were only enabled when POSIX threads were enabled. Because they are a truly safe alternative to per-task variables in an SMP system, they are being enabled in all configurations.
* Remove trailing whitespace in previous patchesJennifer Averett2014-03-073-13/+13
|
* rtems: Add Classic API get and set affinity methods.Jennifer Averett2014-03-074-0/+177
| | | | | | | Add the following methods: + rtems_task_get_affinity + rtems_task_set_affinity
* taskmode: Formatting correctionJoel Sherrill2014-03-051-5/+3
|
* rtems: Add cache size functionsSebastian Huber2014-02-281-0/+20
| | | | | Add rtems_cache_get_data_cache_size() and rtems_cache_get_instruction_cache_size().
* rtems: Use size_t for cache line sizeSebastian Huber2014-02-281-2/+2
| | | | A cache line cannot have a negative size.
* rtems: Cache manager documentationSebastian Huber2014-02-281-66/+79
| | | | Move useful functions to the top of the file.
* score: Rename _Internal_error_Occurred()Sebastian Huber2014-02-211-2/+2
| | | | Rename _Internal_error_Occurred() into _Terminate().
* Require presence of <stdatomic.h> for SMP supportSebastian Huber2014-02-172-2/+2
|
* score: Change debug helper functionsSebastian Huber2014-02-123-11/+13
| | | | | | | | Rename rtems_internal_error_description() to rtems_internal_error_text(). Rename rtems_fatal_source_description() to rtems_fatal_source_text(). Rename rtems_status_code_description() to rtems_status_text(). Remove previous implementation of rtems_status_text().
* rtems: Add rtems_status_code_description()Sebastian Huber2014-02-063-0/+80
|
* rtems/*.c: Remove use of register keywordJoel Sherrill2014-02-0337-73/+73
|
* tasksetpriority.c: Remove obsolete commentJoel Sherrill2014-01-091-2/+1
|
* libcsupport: Refactor rtems_deviceio_errnoDaniel Ramirez2014-01-082-2/+76
| | | | | | Renames rtems_deviceio_errno to rtems_status_code_to_errno and integrates it into the Classic API Status Handler. This function can now be called by including status.h
* cpukit/rtems: Add rtems_clock_get_uptime_nanoseconds to the RTEMS API.Chris Johns2013-12-243-0/+43
| | | | | | Add Timestamp support in the score to return a timestamp in nanoseconds. Add a test. Update the RTEMS API documentation.