summaryrefslogtreecommitdiff
path: root/cpukit (follow)
AgeCommit message (Collapse)Author
2020-02-28score: Fix context switch extensions (SMP)Sebastian Huber
In uniprocessor and SMP configurations, the context switch extensions were called during _Thread_Do_dispatch(): void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ) { Thread_Control *executing; executing = cpu_self->executing; ... do { Thread_Control *heir; heir = _Thread_Get_heir_and_make_it_executing( cpu_self ); ... _User_extensions_Thread_switch( executing, heir ); ... _Context_Switch( &executing->Registers, &heir->Registers ); ... } while ( cpu_self->dispatch_necessary ); ... } In uniprocessor configurations, this is fine and the context switch extensions are called for all thread switches except the very first thread switch to the initialization thread. However, in SMP configurations, the context switch may be invalidated and updated in the low-level _Context_Switch() routine. See: https://docs.rtems.org/branches/master/c-user/symmetric_multiprocessing_services.html#thread-dispatch-details In case such an update happens, a thread will execute on the processor which was not seen in the previous call of the context switch extensions. This can confuse for example event record consumers which use events generated by a context switch extension. Fixing this is not straight forward. The context switch extensions call must move after the low-level context switch. The problem here is that we may end up in _Thread_Handler(). Adding the context switch extensions call to _Thread_Handler() covers now also the thread switch to the initialization thread. We also have to save the last executing thread (ancestor) of the processor. Registers or the stack cannot be used for this purpose. We have to add it to the per-processor information. Existing extensions may be affected, since now context switch extensions use the stack of the heir thread. The stack checker is affected by this. Calling the thread switch extensions in the low-level context switch is difficult since at this point an intermediate stack is used which is only large enough to enable servicing of interrupts. Update #3885.
2020-02-26config: Initialize IO drivers on demandSebastian Huber
2020-02-25score: Fix label defined but not used warningSebastian Huber
Update #3835.
2020-02-25config: Resurrect NULL_DRIVER_TABLE_ENTRYSebastian Huber
This define may be used by application configurations for the CONFIGURE_APPLICATION_EXTRA_DRIVERS definition. Update #3875.
2020-02-25config: Add <rtems/confdefs/wkspace.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Change licence of <rtems/confdefs.h> to BSD-2-Clause according to file history. Update #3053. Close #3875.
2020-02-25config: Add <rtems/confdefs/objectsposix.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/wkspacesupport.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/objectsclassic.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/threads.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/unlimited.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/iodrivers.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/console.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/initthread.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/inittask.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/extensions.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/newlib.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/clock.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/mcpi.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/malloc.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Move the default configuration to library files so that application configurations do not include the definitions for the default case. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/bdbuf.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/scheduler.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/libio.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/percpu.h>Sebastian Huber
Remove comments and copyrightable content from the moved content. Use BSD-2-Clause for new file according to file history of <rtems/confdefs.h>. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/bsp.h>Sebastian Huber
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Add <rtems/confdefs/libpci.h>Sebastian Huber
Derive copyright and license for new file form the file history. Update #3875.
2020-02-25config: Add <rtems/confdefs/obsolete.h>Sebastian Huber
Unify handling of obsolete configuration options. Remove comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Remove _Configure_Max_Objects()Sebastian Huber
Use rtems_resource_maximum_per_allocation() directly. The use of _Configure_Zero_or_one() was superfluous. Update #3875.
2020-02-25config: Improve _Configure_From_workspace()Sebastian Huber
Commit 4c09f4b3fefc7ba5c5868a97ad00c1ee14a06677 changed the cast from size_t to ssize_t to try to fix an workspace issue on 16-bit architectures. This change was reverted by commit 7ff6115b8b913d848b8fe76daf72ca0b4bbf2548 for the workspace but not _Configure_From_workspace(). Change the cast to uintptr_t to be in line with the Heap Handler.
2020-02-25config: Remove CONFIGURE_DISABLE_SMP_CONFIGURATIONSebastian Huber
The CONFIGURE_DISABLE_SMP_CONFIGURATION configuration option and rtems_configuration_is_smp_enabled() were added during the SMP support development cycle as a workaround to fix some testsuite failures in SMP configurations. All use cases were replaced with tests for specific conditions. The configuration option and test macro were undocumented. Close #3876.
2020-02-25rtems: Change timer server task mode settingSebastian Huber
Use the non-preempt mode only in uni-processor configurations. Update #3876.
2020-02-25score: _Scheduler_Is_non_preempt_mode_supported()Sebastian Huber
If the non-preempt mode for threads is supported depends on the scheduler implementation. Add _Scheduler_Is_non_preempt_mode_supported() to indicate this. Update #3876.
2020-02-25config: CONFIGURE_INIT_TASK_INITIAL_MODESSebastian Huber
Determine the default for CONFIGURE_INIT_TASK_INITIAL_MODES depeding on whether RTEMS_SMP is defined or not. In the tests, use CONFIGURE_INIT_TASK_INITIAL_MODES to explicitly request RTEMS_NO_PREEMPT mode if necessary. Update #3876.
2020-02-25score: Add _SMP_Need_inter_processor_interrupts()Sebastian Huber
Test for the proper system condition instead of using the rtems_configuration_is_smp_enabled() workaround. Update #3876.
2020-02-25libio: Add POSIX user environment pointer to TCBSebastian Huber
The IO library used a POSIX key to store an optional POSIX user environment pointer. This pulled in the POSIX keys support in every application configuration. Add a user environment pointer to the thread control block (TCB) instead. Applications which do not need the POSIX user environment will just get an overhead of one pointer per thread. Close #3882.
2020-02-25config: Add _SMP_Is_enabledSebastian Huber
Move the is SMP enabled configuration constant out of the configuration table. Since this was the last configuration constant in rtems_configuration_table, remove this type. Update #3875.
2020-02-25config: Add _SMP_Processor_configure_maximumSebastian Huber
Move the processor maximum configuration constant out of the configuration table. Update #3875.
2020-02-25config: Add _Workspace_Is_unifiedSebastian Huber
Move the unified workspace configuration constant out of the configuration table. Provide a default definition of the unified workspace constant. Update #3875.
2020-02-25config: Add _Workspace_SizeSebastian Huber
Move the workspace size configuration constant out of the configuration table. Update #3875.
2020-02-25config: Add _Thread_Idle_bodySebastian Huber
Move the idle thread body configuration constant out of the configuration table. Provide a default definition of the idle thread body constant. Update #3875.
2020-02-25config: Add _Thread_Idle_stack_sizeSebastian Huber
Move the idle thread stack size configuration constant out of the configuration table. Add THREAD_IDLE_STACK_SIZE_DEFAULT and use it to provide a default definition of the idle thread stack size constant. Update #3875.
2020-02-25config: Add _Watchdog_Ticks_per_timesliceSebastian Huber
Move the ticks per timeslice configuration constant out of the configuration table. Add WATCHDOG_TICKS_PER_TIMESLICE_DEFAULT and use it to provide a default definition of the watchdog ticks per timeslice constant. Update #3875.
2020-02-25config: Add _Watchdog_Microseconds_per_tickSebastian Huber
Move the microseconds per tick configuration constant out of the configuration table. Add WATCHDOG_MICROSECONDS_PER_TICK_DEFAULT and use it to provide a default definition of the watchdog ticks constants. Update #3875.
2020-02-25config: Remove CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLESebastian Huber
The CONFIGURE_HAS_OWN_INIT_TASK_TABLE and CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE are the last *_HAS_OWN_* configuration options. These two options are probably unused, see also: * https://lists.rtems.org/pipermail/users/2019-April/033129.html * https://lists.rtems.org/pipermail/users/2019-April/033130.html Removing them simplifies the configuration. If there is a real user need which shows up after the removal, we can resurrect them on demand. Using CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE would have required the use of the undocumented CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME and CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE configuration options. Update #3874.
2020-02-25config: Bring back RTEMS 4.11 configuration tableSebastian Huber
This improves API backward compatibility of RTEMS 5.1 to previous versions.
2020-02-25rtems: Simplify _RTEMS_tasks_Initialize_user_task()Sebastian Huber
Due to the system initialization order, the _Thread_Global_constructor must be 0 in this function.
2020-02-25config: Simplify initialization task configSebastian Huber
With the removal of the CONFIGURE_HAS_OWN_INIT_TASK_TABLE configuration option at most one Classic API user initialization task can be configured. Provide an RTEMS API configuration table for backward compatibility. Update #3873.
2020-02-25config: Remove CONFIGURE_HAS_OWN_INIT_TASK_TABLESebastian Huber
The CONFIGURE_HAS_OWN_INIT_TASK_TABLE and CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE are the last *_HAS_OWN_* configuration options. These two options are probably unused, see also: * https://lists.rtems.org/pipermail/users/2019-April/033129.html * https://lists.rtems.org/pipermail/users/2019-April/033130.html Removing them simplifies the configuration. If there is a real user need which shows up after the removal, we can resurrect them on demand. Using CONFIGURE_HAS_OWN_INIT_TASK_TABLE would have required the use of the undocumented CONFIGURE_INIT_TASK_TABLE and CONFIGURE_INIT_TASK_TABLE_SIZE configuration options. Update #3873.
2020-02-17config: Remove unused declaration and definesSebastian Huber
Update #3875.
2020-02-17posix: Remove <rtems/posix/ptimer.h>Sebastian Huber
This file contained duplicate prototypes for standard POSIX functions declared in <time.h>.
2020-02-17monitor: Use proper API for all config constantsSebastian Huber