summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport (follow)
Commit message (Collapse)AuthorAgeFilesLines
* consolesimpletask.c: Fix Two Unchecked Return Values (CID #1437625 and #1472765)Ryan Long2021-02-121-2/+5
| | | | | | | CID 1437625: Unchecked return value from call to rtems_task_create(). CID 1472765: Unchecked return value from call to rtems_task_start(). Closes #4237.
* libcsupport: Add sbrk greedy support to consume all sbrk memoryChris Johns2021-02-102-12/+70
| | | | | | | | | - Move the heap sbrk code into a separate routnine. - Update heap and workspace greedy allocators to use the common sbrk greedy support. Closes #3982
* libcsupport: Have greedy allocations use consume extended memoryChris Johns2021-02-081-0/+13
| | | | | | | - Call the heap extend handler until all memory has been requested. Closes #3982
* libcsupport: Add no_regular_file_mknod as a mount option to the mount tableChris Johns2021-02-081-5/+8
| | | | | | | | | | | | | - Add the bool flag no_regular_file_mknod to the mount table so a file system can indicate creating regular files is not done by use the mknod handler. The file system will handle creating a file node in the open handler. - Note, the mount option is an enum which means there is only one exclusive option supported. As a result no encapsulation is provided and file systems need to set no_regular_file_mknod directly. Closes #4222
* Decouple the C Program Heap initializationSebastian Huber2020-10-012-44/+90
| | | | | | | Before this patch RTEMS_Malloc_Initialize() had a fixed dependency on _Workspace_Area. Introduce _Workspace_Malloc_initializer to have this dependency only if CONFIGURE_UNIFIED_WORK_AREAS is defined by the application configuration.
* config: Add zero file descriptor data structuresSebastian Huber2020-08-311-0/+46
| | | | | Fix linker errors in the minimum test program on some BSPs introduced by ced28f2cfcee6d32ad7bb72e16b235212eb2eaaf.
* termios: Make rtems_termios_ttyMutex privateSebastian Huber2020-08-042-2/+3
| | | | This mutex is used to maintain termios internal data structures.
* malloc: Make deferred free support optionalSebastian Huber2020-07-243-39/+46
| | | | | | | | | | | | | | | | | | | | Only include the deferred free support if free() is actually used by the application. The free() implementation in RTEMS supports that allocated memory is freed in interrupt context. Since the heap is protected by a mutex, the frees issued in interrupt context cannot immediately be freed to the heap, instead they are placed on a deferred free list. This list is emptied by the core allocation function rtems_heap_allocate_aligned_with_boundary(). This adds a dependency to free() in rtems_heap_allocate_aligned_with_boundary(). In order to better support applications which only allocate memory and never free it, this dependency should be avoided. Provide a weak default implementation of _Malloc_Process_deferred_frees() for rtems_heap_allocate_aligned_with_boundary(). In the free() module provide the strong implementation. Close #4032.
* score: Add CPU_USE_LIBC_INIT_FINI_ARRAYKinsey Moore2020-06-301-4/+1
| | | | | | | | This introduces the CPU_USE_LIBC_INIT_FINI_ARRAY define for use by CPU ports to determine which global constructor and destructor methods are used instead of placing architecture defines where they shouldn't be. Close #4018
* termios: Replace rtems_termios_isig_status_codeSebastian Huber2020-05-072-40/+12
| | | | | | | | | | Merge the rtems_termios_isig_status_code and rtems_termios_iproc_status_code enums into a single rtems_termios_iproc_status_code which is now a part of the API. Simplify rtems_termios_posix_isig_handler() to avoid unreachable code. Close #3800.
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-2817-17/+34
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-16185-232/+232
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* rtems: Add rtems_put_char()Sebastian Huber2020-03-162-6/+39
| | | | Update #3904.
* libio: Robust file descriptor reference countingSebastian Huber2020-03-135-14/+23
| | | | | | | | | | | | There was a race conditon in the reference counting of file descriptors during a close() operation. After the call to the close handler, the rtems_libio_free() function cleared the flags to zero. However, at this point in time there may still exist some holders of the file descriptor. With RTEMS_DEBUG enabled this could lead to failed assertions in rtems_libio_iop_drop(). Change the code to use only atomic read-modify-write operations on the rtems_libio_iop::flags.
* console: Use IMFS_add_node() for simple task consSebastian Huber2020-03-041-20/+50
| | | | | | | Change license to BSD-2-Clause according to file history. Update #3053. Update #3894.
* console: Use IMFS_add_node() for simple consoleSebastian Huber2020-03-041-17/+38
| | | | | | | Change license to BSD-2-Clause according to file history. Update #3053. Update #3894.
* config: Add <rtems/confdefs/malloc.h>Sebastian Huber2020-02-252-0/+69
| | | | | | | | | | | 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.
* libio: Add POSIX user environment pointer to TCBSebastian Huber2020-02-253-35/+58
| | | | | | | | | | 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.
* termios: Fix input canonical modeSebastian Huber2020-02-101-50/+33
| | | | | | | | Canonical input processing was broken by 667501a314ba75f80f1c13c6b43dd35d0a00efd1 as shown by test case termios09. Update #3800.
* bsps: Rework work area initializationSebastian Huber2020-02-041-16/+41
| | | | | | | | | | | | | | | | | | | | The work area initialization was done by the BSP through bsp_work_area_initialize(). This approach predated the system initialization through the system initialization linker set. The workspace and C program heap were unconditionally initialized. The aim is to support RTEMS application configurations which do not need the workspace and C program heap. In these configurations, the workspace and C prgram heap should not get initialized. Change all bsp_work_area_initialize() to implement _Memory_Get() instead. Move the dirty memory, sbrk(), per-CPU data, workspace, and malloc() heap initialization into separate system initialization steps. This makes it also easier to test the individual initialization steps. This change adds a dependency to _Heap_Extend() to all BSPs. This dependency will be removed in a follow up change. Update #3838.
* posix_devctl - Add support for SOCKCLOSEJoel Sherrill2020-01-171-1/+15
| | | | | | | | | The FACE Technical Standard, Edition 3.0 and later require the definition of the subcommand SOCKCLOSE in <devctl.h>. Reference: ​https://www.opengroup.org/face closes #3856.
* libcsupport: Update rtems_print printk handler to return the lengthChris Johns2019-12-161-2/+1
|
* rtems: Add and use rtems_object_get_local_node()Sebastian Huber2019-12-134-7/+11
| | | | Update #3841.
* kill: Fix warningSebastian Huber2019-11-051-1/+1
| | | | Include right header file for kill().
* termios: Add Capability to Generate SIGINTR and SIGQUITJoel Sherrill2019-10-082-39/+225
| | | | | | | | | | | | | | This patch adds the ability for termios to send SIGINTR on receipt of VINTR and SIGQUIT for VKILL and return -1/EINTR from read() on a termios channel. Importantly, this patch does not alter the default behavior or force POSIX signal code in just because termios is used. The application must explicitly enable the POSIX behavior of generating a signal upon receipt of these characters. This is discussed in the POSIX standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html Closes #3800.
* Remove superfluous <rtems/system.h> includesSebastian Huber2019-03-145-5/+0
|
* memalign: Add missing attributes to fix warningSebastian Huber2019-01-101-1/+3
| | | | Update #3666.
* Add aligned_alloc() and memalign()Sebastian Huber2018-12-211-0/+41
| | | | | | Ensure that the C++17 aligned new operator works. Close #3666.
* or1k: Support GCC 9Sebastian Huber2018-11-141-1/+2
| | | | Close #3602.
* Add rtems_malloc() and rtems_calloc()Sebastian Huber2018-11-121-0/+25
| | | | Close #3583.
* libcsupport: Add missing includeSebastian Huber2018-11-081-0/+1
| | | | Update #3598.
* config: Include <rtems.h> for RTEMS_NEWLIBSebastian Huber2018-11-071-0/+2
|
* termios: Move default lock functionsSebastian Huber2018-11-072-18/+18
| | | | | | | Move rtems_termios_device_lock_acquire_default() and rtems_termios_device_lock_release_default() to a file separate from the general Termios support. This avoids complex dependencies in printk() only scenarios.
* config: Fix CONFIGURE_DISABLE_NEWLIB_REENTRANCYSebastian Huber2018-11-071-0/+26
| | | | | | | | | | | Move the __getreent() variant using the global reentrancy structure to librtemscpu.a. This avoids a definition of __getreent() in the configuration module if CONFIGURE_DISABLE_NEWLIB_REENTRANCY is defined. This avoids all the dependencies which would be exposed by a reference to the global reentrancy structure. This change is only possible since the default configuration moved to librtemsdefaultconfig.a recently.
* posix: Provide threads by defaultSebastian Huber2018-10-291-26/+4
| | | | Update #2514.
* Remove checks for flockfile(), etc. declarationsSebastian Huber2018-10-223-3/+3
| | | | | | Declarations provided by Newlib since 2002. Update #3409.
* Remove getcwd()Sebastian Huber2018-10-221-296/+0
| | | | | | This function is provided by Newlib since 2000. Update #3409.
* Remove optional getrusage() declarationSebastian Huber2018-10-221-4/+0
| | | | | | Declaration provided by Newlib since 2014. Update #3409.
* Remove ttyname()Sebastian Huber2018-10-221-121/+0
| | | | | | This function is provided by Newlib since 2000. Update #3409.
* Remove __assert()Sebastian Huber2018-10-221-15/+0
| | | | | | This function is provided by Newlib since 2000. Update #3409.
* Remove isatty()Sebastian Huber2018-10-221-40/+0
| | | | | | These functions are provided by Newlib since 2000. Update #3409.
* Remove strlcat(), strlcpy(), strsep(), readdir_r()Sebastian Huber2018-10-223-131/+0
| | | | | | These functions are provided by Newlib since 2002. Update #3409.
* Support O_NOFOLLOW open() flagSebastian Huber2018-10-221-1/+6
| | | | Close #3546.
* Support O_DIRECTORY open() flagSebastian Huber2018-10-181-2/+13
| | | | Close #3545.
* console: Be fair in simple console readSebastian Huber2018-10-181-2/+7
| | | | | | | Wait for one tick in case no character is available after a call to getchark(). Otherwise the system is constantly busy within an input loop (for example in the RTEMS shell). The polled Termios driver uses the same approach.
* build: Merge libcsupport/Makefile.amSebastian Huber2018-10-091-134/+0
|
* build: Remove specialized CPPFLAGSSebastian Huber2018-10-091-2/+0
|
* Optimize calloc()Sebastian Huber2018-10-041-4/+5
| | | | Use return value of memset() to enable tail call optimizations.
* Avoid need for -fno-builtin for calloc()Sebastian Huber2018-10-041-0/+2
| | | | Use RTEMS_OBFUSCATE_VARIABLE() instead.
* Remove superfluous pipe_create()Sebastian Huber2018-10-042-40/+1
|