summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/userextimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not use RTEMS_INLINE_ROUTINESebastian Huber2022-09-191-2/+2
| | | | | | | Directly use "static inline" which is available in C99 and later. This brings the RTEMS implementation closer to standard C. Close #3935.
* cpukit/include/rtems/score/[s-z]*.h: Change license to BSD-2Joel Sherrill2022-02-281-3/+22
| | | | Updates #3053.
* Avoid ISR_LOCK_MEMBER() since it confuses DoxygenSebastian Huber2021-12-091-1/+3
| | | | | If RTEMS_SMP is not defined, then Doxygen adds the comments intended for conditional the lock member to the next member.
* score: Canonicalize Doxygen @file commentsSebastian Huber2020-12-021-1/+2
| | | | | | Use common phrases for the file brief descriptions. Update #3706.
* score: Fix context switch extensions (SMP)Sebastian Huber2020-02-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* doxygen: score: adjust doc in userextimpl.h to doxygen guidelinesAndreas Dachsberger2019-05-131-4/+152
| | | | Update #3706.
* score: Use an ISR lock for Per_CPU_Control::LockSebastian Huber2019-04-121-14/+9
| | | | | | The use of a hand crafted lock for Per_CPU_Control::Lock was necessary at some point in the SMP support development, but it is no longer justified.
* doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber2019-04-041-2/+2
| | | | Update #3706
* doxygen: Reviewed cpukit/include/rtems/scoreAndreas Dachsberger2019-04-021-7/+3
| | | | Update #3706.
* score: Fix _User_extensions_Thread_switch() (SMP)Sebastian Huber2019-02-081-3/+11
| | | | | We have to read the first node again once we obtained the lock since it may have aready changed.
* score: Move internal structures to userextdata.hSebastian Huber2018-11-121-1/+1
| | | | Update #3598.
* score: Avoid include of <rtems/score/thread.h>Sebastian Huber2018-11-121-1/+2
| | | | Update #3598.
* Remove make preinstallChris Johns2018-01-251-0/+369
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.