summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Canonicalize config.h includeSebastian Huber2020-04-16225-226/+226
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* score: Check time of day in _TOD_Set()Sebastian Huber2020-04-141-3/+0
| | | | Close #3949.
* score: Return status in _TOD_Set()Sebastian Huber2020-04-141-4/+5
| | | | Update #3949.
* libio: Robust file descriptor reference countingSebastian Huber2020-03-131-2/+2
| | | | | | | | | | | | 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.
* config: Add <rtems/confdefs/threads.h>Sebastian Huber2020-02-251-0/+2
| | | | | | | | Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
* config: Remove CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLESebastian Huber2020-02-251-44/+31
| | | | | | | | | | | | | | | | | | | 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.
* posix: Remove <rtems/posix/ptimer.h>Sebastian Huber2020-02-171-1/+0
| | | | | This file contained duplicate prototypes for standard POSIX functions declared in <time.h>.
* score: Move thread stack allocationSebastian Huber2020-02-121-5/+15
| | | | | | Move thread stack allocation to caller side of _Thread_Initialize(). Update #3835.
* score: Add Thread_ConfigurationSebastian Huber2020-02-121-27/+24
| | | | | | | | | Add the Thread_Configuration structure to reduce the parameter count of _Thread_Initialize(). This makes it easier to add more parameters in the future. It simplifies the code generation since most architectures do not have that many registers available for function parameters. Update #3835.
* score: Simplify FP context allocationSebastian Huber2020-02-121-7/+7
| | | | | | | | | | | Use the stack area to allocate the FP context. This considerably simplifies the application configuration since the task count no longer influences the configured work space size. With this change the stack space size is overestimated since an FP context for each thread is accounted. Memory constraint applications can use the stack size for fine tuning. Update #3835.
* Add TOD Hooks to allow BSP to take action when TOD is setJoel Sherrill2019-12-111-4/+12
| | | | | | | | | | | | Two use cases were envisioned for this. 1) a BSP or application which desires to update a real-time clock when the RTEMS TOD is set. 2) a paravirtualized BSP can use this to propagate setting the time in an RTEMS application to the hosting environment. This enables the entire set of applications in the virtualized environments to have a single consistent TOD.
* Move feature macro before "config.h" includeSebastian Huber2019-11-197-11/+17
| | | | | | | This allows to use header includes in "config.h" to reduce the build configuration checks. Update #3818.
* Correct initial POSIX signals maskJoel Sherrill2019-09-241-5/+48
| | | | | | | | | | | | + Modify POSIX thread create extension to ensure expected initial signal mask is provided to system threads, initial tasks and threads, and inheritied by tasks and threads. + Adds psxsignal07 to verify functionality when using a POSIX Initialization thread and POSIX threads. + Adds psxsignal08 to verify functionality when using a Classic API Initialization task and Classic API tasks. Closes #3794.
* score: Use an ISR lock for Per_CPU_Control::LockSebastian Huber2019-04-122-8/+16
| | | | | | 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.
* posix: Avoid fatal error in Shm object createSebastian Huber2019-04-101-1/+5
|
* posix: Avoid workspace for queued signalsSebastian Huber2019-04-102-18/+12
|
* posix: _Configuration_POSIX_Maximum_queued_signalsSebastian Huber2019-04-102-2/+2
| | | | Rename to use proper namespace.
* rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber2019-04-091-1/+1
| | | | | | | | | | | Add rtems_scheduler_get_processor_maximum() as a replacement for rtems_get_processor_count(). The rtems_get_processor_count() is a bit orphaned. Adopt it by the Scheduler Manager. The count is also misleading, since the processor set may have gaps and the actual count of online processors may be less than the value returned by rtems_get_processor_count(). Update #3732.
* Remove superfluous run-time checkSebastian Huber2019-04-091-7/+1
| | | | | The _Objects_Information_table[ the_api ] is never NULL for a valid API index.
* pthreadcreate.c: Silence unused variable warning (CID 1399716)Joel Sherrill2019-03-251-0/+1
|
* shmopen.c: Fix logically unreachable code (Coverity ID: 1399706, 1399714)Joel Sherrill2019-03-141-2/+3
| | | | Closes #3694.
* Remove superfluous <rtems/system.h> includesSebastian Huber2019-03-1439-40/+3
|
* posix: is_initialized is of type int not boolSebastian Huber2019-03-133-3/+3
|
* score: Static Objects_Information initializationSebastian Huber2018-12-1413-515/+510
| | | | | | | | | | | Statically allocate the objects information together with the initial set of objects either via <rtems/confdefs.h>. Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621.
* posix: Fix shm_unlink()Sebastian Huber2018-12-111-1/+10
| | | | This function is untested.
* score: Remove Objects_Information::maximumSebastian Huber2018-12-071-1/+1
| | | | | | | This information is already present in Objects_Information::maximum_id. Add and use _Objects_Get_maximum_index(). Update #3621.
* score: Optimize object lookupSebastian Huber2018-12-071-1/+1
| | | | | | | | | | | | | | | | Use the maximum ID for the ID to object translation. Using the maximum ID gets rid of an additional load from the object information in _Objects_Get(). In addition, object lookups fail for every ID in case the object information is cleared to zero. This makes it a bit more robust during system startup (see new tests in spconfig02). The local table no longer needs a NULL pointer entry at array index zero. Adjust all the object iteration loops accordingly. Remove Objects_Information::minimum_id since it contains only redundant information. Add _Objects_Get_minimum_id() to get the minimum ID. Update #3621.
* score: Remove Objects_Information::is_stringSebastian Huber2018-12-075-7/+2
| | | | | | Use Objects_Information::name_length to store this information. Update #3621.
* 5 spelling errors for a Google Code-In task.Jacob Shin2018-12-021-1/+1
| | | | Username: deuteriumoxide Email: jacobshin313@gmail.com
* posix: Provide threads by defaultSebastian Huber2018-10-294-15/+37
| | | | Update #2514.
* posix: Provide shared memory objects by defaultSebastian Huber2018-10-291-0/+40
| | | | Update #2514.
* posix: Split posix_api_configuration_tableSebastian Huber2018-10-2913-13/+212
| | | | | | Use separate configuration variables to avoid false dependencies. Update #2514.
* Remove RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMESSebastian Huber2018-10-293-5/+5
| | | | | | | | | Enable support for string objects names unconditionally. Add const qualifier throughout. Split _Objects_Namespace_remove() into _Objects_Namespace_remove_u32() and _Objects_Namespace_remove_string() to avoid an unnecessary dependency on _Workspace_Free(). Update #2514.
* score: Remove bogus thread object name supportSebastian Huber2018-10-291-3/+1
| | | | Update #2514.
* posix: Provide get thread attributes by defaultSebastian Huber2018-10-241-0/+4
| | | | Update #2514.
* posix: Fix unused result warningSebastian Huber2018-10-121-2/+2
|
* build: Merge posix/Makefile.amSebastian Huber2018-10-101-200/+0
|
* build: Remove specialized CPPFLAGSSebastian Huber2018-10-091-1/+0
|
* posix: Remove static assertionSebastian Huber2018-10-091-2/+0
| | | | | | | | Standard C does not allow pointer operands in an integer constant expressions. GCC issues only a -Wpedantic warning in the removed static assertion. However, clang is pedantic by default and issues an error. Rely on the test case instead.
* score: Fix legacy RTEMS_STATIC_ASSERT()Sebastian Huber2018-10-052-2/+3
| | | | | | | | | In standard C pointer operands are not allowed in integer constant expressions. Avoid a static assertion based on an array typedef since this could lead to warnings ("variably modified 'x' at file scope" and "typedef 'x' locally defined but not used"); This implementation requires unique messages.
* Rename files to make them unique within cpukitSebastian Huber2018-10-044-2/+2
| | | | This allows to build librtemscpu.a in one rush in the future.
* posix: Add configure check for mprotect()Sebastian Huber2018-08-101-0/+4
| | | | Update #3491.
* score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE()Sebastian Huber2018-07-253-4/+4
| | | | | | | Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch prediction hints. Close #3475.
* posix: Fix rwlock auto initializationSebastian Huber2018-07-161-1/+1
| | | | Add more test cases.
* posix: Check for new <pthread.h> prototypesSebastian Huber2018-07-053-8/+16
| | | | | Update #3342. Update #3343.
* build: Remove EXTRA_DISTSebastian Huber2018-04-041-2/+0
| | | | | A "make dist" is not supported. So, it makes no sense to have pure "make dist" related stuff in the Makefile.am.
* Use _Thread_Dispatch_direct()Sebastian Huber2018-02-082-2/+2
| | | | | | | Use _Thread_Dispatch_direct() for operations that block the executing thread. This ensures that we get a fatal error (INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in an invalid context, e.g. during system start or an interrupt handler.
* posix: Use one second based CLOCK_MONOTONICSebastian Huber2018-02-021-2/+3
| | | | | | | This simplifies the CLOCK_MONOTONIC based time services. It is potentially important for libbsd. Close #3265.
* score: Introduce new monotonic clockSebastian Huber2018-02-028-14/+14
| | | | | | | | Rename PER_CPU_WATCHDOG_MONOTONIC to PER_CPU_WATCHDOG_TICKS. Add new PER_CPU_WATCHDOG_MONOTONIC which is based on the system uptime (measured by timecounter). Close #3264.
* Remove make preinstallChris Johns2018-01-2532-3982/+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.