summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-25104-30436/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* libio: Use API mutexSebastian Huber2017-12-061-1/+1
|
* score: Use self-contained API mutexSebastian Huber2017-12-045-75/+23
| | | | | | | | | | Use a self-contained recursive mutex for API_Mutex_Control. The API mutexes are protected against asynchronous thread cancellation. Add dedicated mutexes for libatomic and TOD. Close #2629. Close #2630.
* sapi: New implementation of rtems_panic()Sebastian Huber2017-11-221-0/+7
| | | | | | | | | | | | The previous rtems_panic() implementation was quite heavy weight. It depended on _exit() which calls the global destructors. It used fprintf(stderr, ...) for output which depends on an initialized console device and the complex fprintf(). Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic() and output via vprintk(). Update #3244.
* INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULLSebastian Huber2017-11-221-1/+1
| | | | | | Delete superfluous INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL. Update #3243.
* score: Simplify global constructionSebastian Huber2017-11-221-13/+10
| | | | Update #3243.
* score: Optimize scheduler priority updatesSebastian Huber2017-11-2010-236/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thread priority changes may append or prepend the thread to its priority group on the scheduler ready queue. Previously, a separate priority value and a prepend-it flag in the scheduler node were used to propagate a priority change to the scheduler. Now, use an append-it bit in the priority control and reduce the plain priority value to 63 bits. This change leads to a significant code size reduction (about 25%) of the SMP schedulers. The negligible increase of the standard priority scheduler is due to some additional shift operations (SCHEDULER_PRIORITY_MAP() and SCHEDULER_PRIORITY_UNMAP()). Before: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 464 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 328 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 24112 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 37204 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 42236 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o After: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 272 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 208 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 332 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 18860 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 28520 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 32664 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o
* cpukit: Add _arc4random_getentropy_fail.Christian Mauderer2017-11-171-1/+2
| | | | | | | Add a default implementation of _arc4random_getentropy_fail with an internal error. Update #3239.
* score: Adjust _Scheduler_EDF_SMP_Insert_ready()Sebastian Huber2017-11-171-1/+1
| | | | | Use only one parameter to compute the next generation. Use index 0 for LIFO ordering, and index 1 for FIFO ordering.
* score: Change _Timecounter_Time_uptime to int32_tSebastian Huber2017-11-091-1/+2
| | | | | | | Move basic timecounter API shared with BSD network stack to <machine/_timecounter.h>. Update #3185.
* posix: Change created_with_explicit_schedulerSebastian Huber2017-11-091-0/+6
| | | | | | | | Remove POSIX_API_Control::created_with_explicit_scheduler. Add Thread_Control::was_created_with_inherited_scheduler. This fixes also pthread_getattr_np() for Classic tasks. Update #2514.
* score: Use Processor_mask instead of cpu_set_tSebastian Huber2017-11-061-2/+2
|
* score: _Chain_Insert_ordered_unprotected()Sebastian Huber2017-11-064-46/+89
| | | | | | Change the chain order relation to use a directly specified left hand side value. This is similar to _RBTree_Insert_inline() and helps the compiler to better optimize the code.
* score: Remove superfluous includeSebastian Huber2017-11-061-3/+0
| | | | Update #3059.
* score: Add _IO_Printf() and _IO_Vprintf()Sebastian Huber2017-11-061-0/+46
| | | | | | | | | | | | | | The previous vprintk() implementation had a questionable licence header, lacks support for the 'z' and 'j' format specifiers, is not robust against invalid format specifiers, uses a global variable for output. Replace it with a stripped down version of the FreeBSD kernel kvprintf() function. The new implementation allows a low overhead rtems_snprintf() if necessary. Update #3199. Close #3216.
* posix: Use far future for very long timeoutsSebastian Huber2017-11-021-0/+30
| | | | Close #3205.
* score: Simplify SMP get lowest scheduledSebastian Huber2017-10-281-7/+4
| | | | | | There is no need to pass in the order relation since the scheduled threads reside on an already ordered chain. The caller will decide what to do with the lowest scheduled thread.
* score: Delete _Scheduler_Thread_set_priority()Sebastian Huber2017-10-261-12/+0
|
* score: Move thread queue timeout handlingSebastian Huber2017-10-246-106/+114
| | | | | Update #3117. Update #3182.
* score: Rename function threadq support functionSebastian Huber2017-10-243-7/+7
| | | | | | | | | Rename _Thread_queue_Context_set_do_nothing_enqueue_callout() into _Thread_queue_Context_set_enqueue_do_nothing_extra(). More _Thread_queue_Context_set_enqueue_*() functions will follow. Update #3117. Update #3182.
* score: Add _Thread_Continue()Sebastian Huber2017-10-241-2/+16
| | | | | Update #3117. Update #3182.
* score: _Watchdog_Per_CPU_lazy_insert_monotonic()Sebastian Huber2017-10-241-0/+25
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Monotonic_from_timespec()Sebastian Huber2017-10-241-0/+16
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Nanoseconds_per_tickSebastian Huber2017-10-241-0/+8
| | | | | | | Move it from the configuration to a separate variable. Update #3117. Update #3182.
* score: _Watchdog_Is_far_future_monotonic_timespecSebastian Huber2017-10-242-0/+16
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Is_valid_interval_timespec()Sebastian Huber2017-10-241-0/+7
| | | | | Update #3117. Update #3182.
* score: _Watchdog_Is_far_future_realtime_timespec()Sebastian Huber2017-10-241-9/+32
| | | | | Update #3117. Update #3182.
* score: Rename _Watchdog_Ticks_from_*()Sebastian Huber2017-10-241-3/+3
| | | | | | | | | | Rename _Watchdog_Ticks_from_*() to _Watchdog_Realtime_from_*(). This highlights that these routines are used for the CLOCK_REALTIME watchdogs (in contrast to CLOCK_MONOTONIC). Update #3117. Update #3182.
* score: Add _Watchdog_Ticks_per_secondSebastian Huber2017-10-241-0/+8
| | | | | | | | This value is frequently used. Avoid the function call overhead and the integer division at run-time. Update #3117. Update #3182.
* score: Add _Thread_Add_timeout_ticks()Sebastian Huber2017-10-241-6/+5
| | | | | | | | Replace _Thread_Timer_insert_monotonic() with _Thread_Add_timeout_ticks(). Update #3117. Update #3182.
* score: Rename _Watchdog_Per_CPU_insert_monotonic()Sebastian Huber2017-10-172-2/+2
| | | | | | | | Rename _Watchdog_Per_CPU_insert_monotonic() in _Watchdog_Per_CPU_insert_ticks(). Update #3117. Update #3182.
* score: Rename watchdog variantsSebastian Huber2017-10-173-26/+30
| | | | | | | | | | | Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to highlight the corresponding POSIX CLOCK_MONOTONIC. Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to highlight the corresponding POSIX CLOCK_REALTIME. Update #3117. Update #3182.
* score: Remove unused function declarationSebastian Huber2017-10-121-15/+0
|
* timecounter: Merge FreeBSD change r303382Konstantin Belousov2017-10-121-7/+14
| | | | | | | | | | | | | | | | | | | | | | Hide the boottime and bootimebin globals, provide the getboottime(9) and getboottimebin(9) KPI. Change consumers of boottime to use the KPI. The variables were renamed to avoid shadowing issues with local variables of the same name. Issue is that boottime* should be adjusted from tc_windup(), which requires them to be members of the timehands structure. As a preparation, this commit only introduces the interface. Some uses of boottime were found doubtful, e.g. NLM uses boottime to identify the system boot instance. Arguably the identity should not change on the leap second adjustment, but the commit is about the timekeeping code and the consumers were kept bug-to-bug compatible. Tested by: pho (as part of the bigger patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Update #3175.
* score: Remove CPU_set_ControlSebastian Huber2017-10-115-196/+3
| | | | | | Use Processor_mask instead. Update #2514.
* score: Add _Thread_queue_Dispatch_disable()Sebastian Huber2017-10-103-6/+12
|
* score: Change Timestamp_Control to sbintime_tSebastian Huber2017-10-093-34/+24
| | | | | | | | The timestamp are based on the uptime. There is no need for a 64-bit seconds part. The signed 32-bit seconds part of the sbintime_t limits the uptime to roughly 68 years. Close #2740.
* score: Use struct timespec for TODSebastian Huber2017-10-091-46/+8
| | | | | | | Use the timestamps only for uptime based values. Use struct timespec for the absolute time values (TOD). Update #2740.
* score: Simplify _Timestamp_Add_to()Sebastian Huber2017-10-091-7/+1
| | | | Update #2740.
* posix: Implement self-contained POSIX mutexSebastian Huber2017-10-053-2/+37
| | | | | | | | POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112.
* posix: Implement self-contained POSIX condvarSebastian Huber2017-10-052-2/+0
| | | | | | | | POSIX condition variables are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3113.
* posix: Implement self-contained POSIX rwlocksSebastian Huber2017-10-054-91/+56
| | | | | | | | POSIX rwlocks are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3115.
* posix: Implement self-contained POSIX barriersSebastian Huber2017-10-052-2/+0
| | | | | | | | POSIX barriers are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3114.
* posix: Implement self-contained POSIX semaphoresSebastian Huber2017-10-051-0/+73
| | | | | | | | | | | | | | For semaphore object pointer and object validation see POSIX_SEMAPHORE_VALIDATE_OBJECT(). Destruction or close of a busy semaphore returns an error status. The object is not flushed. POSIX semaphores are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3116.
* posix: Optimize pthread_once_tSebastian Huber2017-10-051-1/+1
| | | | | | Reduce size of pthread_once_t and make it zero-initialized. Update #3142.
* score: Make status codes unconditionalSebastian Huber2017-10-051-9/+2
| | | | | | | | The internal status codes encode a Classic rtems_status_code and error codes used by the POSIX and C11/C++11 APIs. In case the POSIX API is disabled, the C11/C++11 support must still work. Close #3167.
* score: Simplify red-black tree debug supportSebastian Huber2017-09-271-8/+0
| | | | | | | | Make the RBTree_Node layout independent of RTEMS_DEBUG (and all other build configuration options). This allows the use of this structure in Newlib. Update #3112.
* score: Rename to _Scheduler_ControlSebastian Huber2017-09-277-15/+15
| | | | | | | Rename struct Scheduler_Control to _Scheduler_Control to allow its use in standard header files, e.g. <pthread.h>. Update #3112.
* score: Include missing header fileSebastian Huber2017-09-221-0/+2
| | | | Update #3059.
* score: Remove <string.h> include from basedefs.hSebastian Huber2017-08-251-7/+0
| | | | Close #2133.