summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport (follow)
Commit message (Collapse)AuthorAgeFilesLines
* riscv: Fix global constructionSebastian Huber2018-06-291-1/+1
| | | | Update #3433.
* console: Add missing return statusSebastian Huber2018-06-271-0/+2
| | | | Update #3320.
* Add RTEMS_FATAL_SOURCE_INVALID_HEAP_FREESebastian Huber2018-06-051-6/+1
| | | | | | | | An invalid heap usage such as a double free is usually a fatal error since this indicates a use after free. Replace the use of printk() in free() with a fatal error. Update #3437.
* build: Remove EXTRA_DISTSebastian Huber2018-04-041-1/+0
| | | | | A "make dist" is not supported. So, it makes no sense to have pure "make dist" related stuff in the Makefile.am.
* Add a simple task console driverSebastian Huber2018-03-065-25/+284
| | | | Close #3320.
* termios: Fix use of uninitialized variableSebastian Huber2018-02-221-4/+4
| | | | Update #2840.
* termios: Use self-contained objectsSebastian Huber2018-02-022-181/+77
| | | | Update #2840.
* Remove make preinstallChris Johns2018-01-2525-5758/+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.
* Remove obsolete network header filesSebastian Huber2017-12-078-940/+0
| | | | Update #3254.
* libio: Use API mutexSebastian Huber2017-12-062-47/+16
|
* sapi: New implementation of rtems_panic()Sebastian Huber2017-11-222-24/+1
| | | | | | | | | | | | 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.
* cpukit: Add _arc4random_getentropy_fail.Christian Mauderer2017-11-172-1/+23
| | | | | | | Add a default implementation of _arc4random_getentropy_fail with an internal error. Update #3239.
* libio: Add assert to rtems_libio_iop_drop()Sebastian Huber2017-11-151-0/+23
| | | | | | | This assert helps to detect an invalid reference counting in RTEMS_DEBUG configurations. Update #3132.
* score: Change _Timecounter_Time_uptime to int32_tSebastian Huber2017-11-094-0/+60
| | | | | | | Move basic timecounter API shared with BSD network stack to <machine/_timecounter.h>. Update #3185.
* termios: Fix canonical modeSebastian Huber2017-11-071-2/+4
| | | | | | | In canonical mode, input is made available line by line. We must stop the canonical buffer filling upon reception of an end-of-line character. Close #3218.
* Add simple console driverSebastian Huber2017-11-062-0/+98
| | | | | Update #3170. Update #3199.
* score: Add _IO_Printf() and _IO_Vprintf()Sebastian Huber2017-11-061-206/+14
| | | | | | | | | | | | | | 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.
* rtems: Add rtems_print_printer_fprintf_putc()Sebastian Huber2017-10-282-0/+68
| | | | | Update #3170. Update #3199.
* tests: Move rtems_test_printer definitionSebastian Huber2017-10-281-2/+2
| | | | | | | Statically initialize it to use printk(). Update #3170. Update #3199.
* Use right time format in _times()Sebastian Huber2017-10-121-9/+5
| | | | | Update #2740. Close #3179.
* timecounter: Merge FreeBSD change r303382Konstantin Belousov2017-10-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* posix: Implement self-contained POSIX mutexSebastian Huber2017-10-052-2/+0
| | | | | | | | 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-3/+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-052-3/+0
| | | | | | | | 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: Optimize pthread_once_tSebastian Huber2017-10-051-1/+1
| | | | | | Reduce size of pthread_once_t and make it zero-initialized. Update #3142.
* Add "\n" to "\r\n" translation to rtems_putc()Sebastian Huber2017-09-191-1/+5
| | | | Update #3122.
* libio: Remove rtems_libio_t::driverSebastian Huber2017-09-151-1/+0
| | | | | | This member was apparently unused. Close #3133.
* libio: Use FIFO for iop free listSebastian Huber2017-09-154-13/+25
| | | | Update #3136.
* libio: Add hold/drop iop referenceSebastian Huber2017-09-1518-43/+140
| | | | | | | Check iop reference count in close() and return -1 with errno set to EBUSY in case the file descriptor is still in use. Update #3132.
* libio: Unify readv() and writev()Sebastian Huber2017-09-153-26/+50
| | | | Update #3132.
* libio: LIBIO_GET_IOP() LIBIO_GET_IOP_WITH_ACCESS()Sebastian Huber2017-09-1515-81/+62
| | | | | | | | | Replace rtems_libio_check_fd(), rtems_libio_iop(), rtems_libio_check_open() and rtems_libio_check_permissions() combinations with new LIBIO_GET_IOP() and LIBIO_GET_IOP_WITH_ACCESS() macros. Update #3132.
* libio: Add rtems_libio_iop_is_append()Sebastian Huber2017-09-151-0/+10
| | | | Update #3132.
* libio: Add rtems_libio_iop_is_writeable()Sebastian Huber2017-09-151-0/+10
| | | | Update #3132.
* libio: Add rtems_libio_iop_is_readable()Sebastian Huber2017-09-151-0/+10
| | | | Update #3132.
* libio: Add rtems_libio_iop_is_no_delay()Sebastian Huber2017-09-152-1/+11
| | | | Update #3132.
* libio: Add rtems_libio_iop_flags()Sebastian Huber2017-09-152-5/+10
| | | | Update #3132.
* libio: Add rtems_libio_iop_flags_initialize()Sebastian Huber2017-09-154-8/+31
| | | | Update #3132.
* libio: Add iop set/clear flagsSebastian Huber2017-09-154-7/+48
| | | | Update #3132.
* libio: rtems_libio_check_permissions_with_error()Sebastian Huber2017-09-155-7/+7
| | | | | | | Rename rtems_libio_check_permissions_with_error() in rtems_libio_check_permissions(). Update #3132.
* libio: Remove rtems_libio_check_permissions()Sebastian Huber2017-09-152-11/+1
| | | | | | | Remove rtems_libio_check_permissions() and convert single user to rtems_libio_check_permissions_with_error(). Update #3132.
* libio: Do simple parameter checks earlySebastian Huber2017-09-153-12/+14
| | | | | | This simplifies error handling later. Update #3132.
* libio: Simplify rtems_libio_iop()Sebastian Huber2017-09-142-8/+14
| | | | | | | Remove the file descriptor validation. This is the job of rtems_libio_check_fd(). Use an inline function instread of a macro. Update #3132.
* libio: Remove LIBIO_FLAGS_CREATESebastian Huber2017-09-143-8/+0
| | | | Close #3134.
* libio: Remove special-case reference countSebastian Huber2017-09-143-72/+2
| | | | | | The top-level IO library structures should contain no special-case data. Update #2859.
* Simplify and unify BSP_output_charSebastian Huber2017-09-121-2/+2
| | | | | | | | The BSP_output_char should output a char and not mingle with high level processing, e.g. '\n' to '\r\n' translation. Move this translation to rtems_putc(). Remove it from all the BSP_output_char implementations. Close #3122.
* Implement clock()Sebastian Huber2017-09-072-0/+34
| | | | | | | | | | | Newlib uses _times_r() in clock(). The problem is that the _times_r() clock frequency is defined by sysconf(_SC_CLK_TCK). The clock frequency of clock() is the constant CLOCKS_PER_SEC. FreeBSD uses getrusage() for clock(). Since RTEMS has only one process, the implementation can be simplified. Update #3121.
* Fix integer overflow problems in times()Sebastian Huber2017-09-061-34/+16
| | | | | | | An integer overflow may still happen, however, only after 68 years of system uptime. Close #2135.
* Include missing <string.h>Sebastian Huber2017-08-255-0/+5
| | | | Update #2133.
* Fix IO control request typeSebastian Huber2017-07-281-1/+2
|