summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-11score: Rename _Stack_Free_nothing()Sebastian Huber1-1/+1
Rename _Stack_Free_nothing() in _Objects_Free_nothing() to make it reusable for the message queue buffers. Update #4007.
2021-05-02score: Add _Thread_Dispatch_direct_no_return()Sebastian Huber1-1/+1
The __builtin_unreachable() cannot be used with current GCC versions to tell the compiler that a function does not return to the caller, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151 Add a no return variant of _Thread_Dispatch_direct() to avoid generation of dead code.
2021-04-30Use alias for rtems_task_self() and pthread_self()Sebastian Huber1-32/+0
This may reduce the code size a bit.
2021-04-27Return status code for _Thread_Start()Sebastian Huber1-3/+2
This avoids having conditional statements to get the API-specific status code.
2021-04-27Return status code for _Scheduler_Set_affinity()Sebastian Huber2-5/+6
This avoids having conditional statements to get the API-specific status code.
2021-04-27Simplify get affinitiy directivesSebastian Huber1-3/+0
There is no need to disable thread dispatching to get the affinity of a task.
2021-04-27Return status code for _Scheduler_Get_affinity()Sebastian Huber2-6/+8
This avoids having conditional statements to get the API-specific status code.
2021-04-20Remove superfluous <rtems/score/wkspace.h> includesSebastian Huber4-4/+0
2021-03-16score: Add Thread_Configuration::cpu_time_budgetSebastian Huber3-40/+30
Move the CPU time budget to the thread configuration. This simplifies _Thread_Initialize().
2021-02-26score: Fix thread initializationSebastian Huber1-18/+21
Close the thread object if a thread create extension fails. Also call the delete extension to avoid resource leaks in early extensions if a late extension fails. Close #4270.
2021-02-20posix: Remove superfluous checkSebastian Huber1-6/+0
The api pointer is never NULL. Update #4244.
2021-02-20score: Change thread action lockingSebastian Huber1-0/+2
Require that the corresponding lock is acquired before the action handler returns. This helps to avoid recursion in the signal processing. Update #4244.
2020-10-19posix: Fix pthread_spin_unlock()Sebastian Huber1-1/+1
Prevent a call to _SMP_lock_Stats_register_or_max_section_time(). This fixes a thread stack corruption in case RTEMS_PROFILING and RTEMS_SMP is enabled. Close #4157.
2020-09-28rtems: Add rtems_message_queue_construct()Sebastian Huber1-1/+3
In contrast to message queues created by rtems_message_queue_create(), the message queues constructed by this directive use a user-provided message buffer storage area. Add RTEMS_MESSAGE_QUEUE_BUFFER() to define a message buffer type for message buffer storage areas. Update #4007.
2020-09-28score: Improve _CORE_message_queue_Initialize()Sebastian Huber1-8/+9
Return a status code and differentiate between error conditions. Update #4007.
2020-08-31score: Add stack free handler to TCBSebastian Huber1-1/+3
This avoids a dependency to the stack free function in the thread destruction. Update #3959.
2020-08-11posix: Only check shm_unlink obj_err if necessaryKinsey Moore1-22/+23
In the nominal case checked by spsysinit01, obj_err is unmodified if _POSIX_Shm_Get_by_name returns non-NULL. In the case of shm_unlink, this means an uninitialized value is passed into the switch and it appears tests using it were passing by virtue of the stack having the right value on it in most cases. This now checks obj_err only if _POSIX_Shm_Get_by_name returns NULL. Close #4016
2020-05-12posix: Get real priority in pthread_getattr_np()Sebastian Huber1-4/+6
This is in line with pthread_setschedparam() and pthread_getschedparam(). Update #2514.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber165-165/+330
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber225-226/+226
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-04-14score: Check time of day in _TOD_Set()Sebastian Huber1-3/+0
Close #3949.
2020-04-14score: Return status in _TOD_Set()Sebastian Huber1-4/+5
Update #3949.
2020-03-13libio: Robust file descriptor reference countingSebastian Huber1-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.
2020-02-25config: Add <rtems/confdefs/threads.h>Sebastian Huber1-0/+2
Remove all comments and copyrightable content from the moved content. Use BSD-2-Clause license for new file. Update #3053. Update #3875.
2020-02-25config: Remove CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLESebastian Huber1-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.
2020-02-17posix: Remove <rtems/posix/ptimer.h>Sebastian Huber1-1/+0
This file contained duplicate prototypes for standard POSIX functions declared in <time.h>.
2020-02-12score: Move thread stack allocationSebastian Huber1-5/+15
Move thread stack allocation to caller side of _Thread_Initialize(). Update #3835.
2020-02-12score: Add Thread_ConfigurationSebastian Huber1-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.
2020-02-12score: Simplify FP context allocationSebastian Huber1-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.
2019-12-11Add TOD Hooks to allow BSP to take action when TOD is setJoel Sherrill1-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.
2019-11-19Move feature macro before "config.h" includeSebastian Huber7-11/+17
This allows to use header includes in "config.h" to reduce the build configuration checks. Update #3818.
2019-09-24Correct initial POSIX signals maskJoel Sherrill1-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.
2019-04-12score: Use an ISR lock for Per_CPU_Control::LockSebastian Huber2-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.
2019-04-10posix: Avoid fatal error in Shm object createSebastian Huber1-1/+5
2019-04-10posix: Avoid workspace for queued signalsSebastian Huber2-18/+12
2019-04-10posix: _Configuration_POSIX_Maximum_queued_signalsSebastian Huber2-2/+2
Rename to use proper namespace.
2019-04-09rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber1-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.
2019-04-09Remove superfluous run-time checkSebastian Huber1-7/+1
The _Objects_Information_table[ the_api ] is never NULL for a valid API index.
2019-03-25pthreadcreate.c: Silence unused variable warning (CID 1399716)Joel Sherrill1-0/+1
2019-03-14shmopen.c: Fix logically unreachable code (Coverity ID: 1399706, 1399714)Joel Sherrill1-2/+3
Closes #3694.
2019-03-14Remove superfluous <rtems/system.h> includesSebastian Huber39-40/+3
2019-03-13posix: is_initialized is of type int not boolSebastian Huber3-3/+3
2018-12-14score: Static Objects_Information initializationSebastian Huber13-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.
2018-12-11posix: Fix shm_unlink()Sebastian Huber1-1/+10
This function is untested.
2018-12-07score: Remove Objects_Information::maximumSebastian Huber1-1/+1
This information is already present in Objects_Information::maximum_id. Add and use _Objects_Get_maximum_index(). Update #3621.
2018-12-07score: Optimize object lookupSebastian Huber1-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.
2018-12-07score: Remove Objects_Information::is_stringSebastian Huber5-7/+2
Use Objects_Information::name_length to store this information. Update #3621.
2018-12-025 spelling errors for a Google Code-In task.Jacob Shin1-1/+1
Username: deuteriumoxide Email: jacobshin313@gmail.com
2018-10-29posix: Provide threads by defaultSebastian Huber4-15/+37
Update #2514.
2018-10-29posix: Provide shared memory objects by defaultSebastian Huber1-0/+40
Update #2514.