summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* rtems: Check for NULL config in task constructSebastian Huber2021-04-231-0/+4
| | | | | | | Since there are already excessive NULL pointer checks in the Classic API, do this also in rtems_task_construct(). Update #3959.
* rtems: Check for NULL config in msgq constructSebastian Huber2021-04-231-0/+4
| | | | | | | Since there are already excessive NULL pointer checks in the Classic API, do this also in rtems_message_queue_construct(). Update #4007.
* clock:_TOD_To_seconds(): Fix year 2514 overflowFrank Kühndel2021-04-212-1/+2
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes issue #4338 by changing _TOD_Validate() to only accept years till 2105. This requires another patch to change the documentation of rtems_clock_set() and other affected API functions (indicating the end date is 2105 not 2514). I tried to support till year 2514 but it turned out that this needs changing the Timer Manager too. That in turn would mean to change _TOD_Seconds_since_epoch( void ) from 32 to 64 bit. Sebastian pointed out that a naive extension leads to trouble with 32 bit processors. He deemed a safe re-implementation too costly performance wise considering that year 2106 is far away and current binaries using RTEMS Classic API are unlikely to be in use by 2106. The constant TOD_SECONDS_AT_2100_03_01_00_00 in cpukit/rtems/src/clocktodtoseconds.c happens to be wrong by 1 hour. When setting the date 2100-Feb-28 23:59:59 and then reading the date again you will find yourself in 2100-Feb-27. Update #4338
* score: Replace Objects_Name_or_id_lookup_errorsSebastian Huber2021-04-074-36/+9
| | | | | Replace Objects_Name_or_id_lookup_errors with new Status_Control codes. Get rid of the _Status_Object_name_errors_to_status lookup table.
* score: Fix internal error status numberSebastian Huber2021-04-071-0/+22
| | | | | | The value of STATUS_CLASSIC_INTERNAL_ERROR must be equal to RTEMS_INTERNAL_ERROR. Add static assertions to ensure that the status codes match.
* rtems: Relax mode checks in rtems_signal_catch()Sebastian Huber2021-03-191-2/+8
| | | | | | | | Check only for invalid modes if a valid handler is presented to rtems_signal_catch(). When NULL is used for the handler, ASR processing is disabled and the mode is not used. Update #4244.
* rtems: Fix rtems_task_mode()Sebastian Huber2021-03-181-16/+22
| | | | | | Do the ASR and preemption mode change only if requested by the mode mask. The bug was introduced by 508f868237225a75e566d9fd304206363cfe441d.
* rtems: Improve semaphore create error checksSebastian Huber2021-03-161-6/+4
| | | | | | Do not mix checks for different error indicators (RTEMS_NOT_DEFINED and RTEMS_INVALID_NUMBER). This simplifies the specification of rtems_semaphore_create().
* rtems: Require RTEMS_PRIORITY for MrsP semaphoresSebastian Huber2021-03-161-2/+2
| | | | | | | | | MrsP semaphores are a generalization of the priority ceiling semaphores for SMP configurations. Priority ceiling semaphores are required to use the priority task wait queue discipline. Require this discipline also for MrsP semaphores. Close #4347.
* rtems: Simplify rtems_signal_catch()Sebastian Huber2021-03-021-1/+19
| | | | | In uniprocessor configurations, we can simplify rtems_signal_catch(). Add a validation test for the SMP special case.
* rtems: Simplify _Signal_Action_handler()Sebastian Huber2021-03-021-8/+3
| | | | | Use the invariant that an ASR is only processed if ASR processing is enabled.
* score: Fix thread initializationSebastian Huber2021-02-261-16/+7
| | | | | | | | 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.
* score: Simplify core barrierSebastian Huber2021-02-241-14/+15
| | | | | | Use the number of threads which must arrive at the barrier to trip the automatic release also to indicate if the barrier is a manual release barrier.
* score: Remove _Objects_Open()Sebastian Huber2021-02-249-35/+16
| | | | | Use the type safe _Objects_Open_u32() instead. Return the object identifier to enforce a common usage pattern.
* rtems: Simplify rtems_task_mode()Sebastian Huber2021-02-201-32/+25
| | | | | Do the preemption and ASR processing changes in one rush and acquire the thread state lock only once.
* rtems: Avoid potential recursion in ASR handlingSebastian Huber2021-02-201-7/+91
| | | | | | | | Do the mode changes necessary for the ASR processing directly under protection of the thread state lock to avoid the recursive calls to thread dispatching done in rtems_task_mode(). Close #4244.
* rtems: Add _Modes_Apply_timeslice_to_thread()Sebastian Huber2021-02-201-8/+2
| | | | Update #4244.
* rtems: New errors for rtems_signal_catch()Sebastian Huber2021-02-202-10/+19
| | | | | | Ensure that no invalid modes are set during ASR processing. Update #4244.
* rtems: Remove _Modes_Set_interrupt_level()Sebastian Huber2021-02-201-5/+3
| | | | | | This call just obfuscated the call to _ISR_Set_level(). Update #4244.
* rtems: Simplify signal handlingSebastian Huber2021-02-203-32/+33
| | | | | | | Remove superfluous ASR_Information::signals_posted. Move code out of trivial inline functions. Update #4244.
* rtems: Move _Signal_Action_handler()Sebastian Huber2021-02-202-54/+54
| | | | | | | | Move _Signal_Action_handler() and signal MP initialization to rtems_signal_send(). The goal is to make _Signal_Action_handler() a static function in a follow up patch. Update #4244.
* rtems: Remove unused ASR_Information::nest_levelSebastian Huber2021-02-201-2/+0
| | | | Update #4244.
* score: Change thread action lockingSebastian Huber2021-02-201-2/+4
| | | | | | | | Require that the corresponding lock is acquired before the action handler returns. This helps to avoid recursion in the signal processing. Update #4244.
* cputkit/rtems: Remove warningChris Johns2021-02-131-0/+1
|
* libcsupport: Add sbrk greedy support to consume all sbrk memoryChris Johns2021-02-101-2/+10
| | | | | | | | | - Move the heap sbrk code into a separate routnine. - Update heap and workspace greedy allocators to use the common sbrk greedy support. Closes #3982
* rtems: Avoid duplicated implemenationSebastian Huber2021-02-031-2/+7
| | | | | Use the rtems_clock_get_ticks_per_second() macro to implement the rtems_clock_get_ticks_per_second() function.
* rtems: Rework object services APISebastian Huber2021-02-038-98/+72
| | | | | | | | | Add a "Constraints" paragraph to the documentation. Provide prototypes for programming language bindings. Use the macro implementation to implement the corresponding functions. Update #3993.
* rtems: Mark value as usedSebastian Huber2021-02-011-0/+1
| | | | This fix relates to a Coverity issue (UNUSED_VALUE).
* score: Add _Thread_Get_objects_information()Sebastian Huber2021-02-011-0/+8
| | | | | | | | | | | | | | | | | | | | | We do not need all the checks if we have a valid indentifier to a thread class object. Using the new _Thread_Get_objects_information() instead of the inline function _Thread_Get_objects_information_by_id() avoids dead code since the identifier in a thread control is always valid and the return NULL path in _Thread_Get_objects_information_by_id() would be dead code. The _Thread_Get_objects_information_by_id() should be an inline function since it is used by _Thread_Get() and thus performance critical. Static analyzers which cannot derive that the identifier in a thread control is always valid, may find a potential NULL pointer access (or otherwise find dead code). The identifier in an object control is always valid, see _Objects_Initialize_information() and _Objects_Extend_information(). Move _RTEMS_tasks_Free() to the only source file which calls this function.
* rtems: Use _Status_Get()Sebastian Huber2021-01-283-3/+6
| | | | This fixes implicit conversions between different enum types.
* rtems: Fix rtems_object_set_name()Sebastian Huber2020-12-031-2/+3
| | | | | Return RTEMS_NO_MEMORY if there is not memory available to duplicate the name.
* rtems: Canonicalize Doxygen @file commentsSebastian Huber2020-12-02151-348/+702
| | | | | | Use common phrases for the file brief descriptions. Update #3706.
* rtems: Canonicalize implementation Doxygen groupsSebastian Huber2020-12-0224-24/+24
| | | | | | | | | Rename Classic API top-level group from Classic to RTEMSImplClassic. Use RTEMSImplClassic as a prefix for the subgroups. Change the group names to be in line with the API group names. Use common phrases for the group brief descriptions. Update #3706.
* rtems: Add <rtems/rtems/clockimpl.h>Sebastian Huber2020-12-025-5/+5
|
* rtems: Remove empty and unused rtclock.cSebastian Huber2020-11-271-27/+0
|
* config: CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZESebastian Huber2020-11-261-0/+65
| | | | | | | | | | In order to better support applications which use the new rtems_task_construct() directive add the CONFIGURE_INIT_TASK_CONSTURCT_STORAGE_SIZE configuration option. If this option is specified, then the Classic API initialization task is constructed with rtems_task_construct(). Update #4181.
* Avoid INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULLSebastian Huber2020-11-261-7/+1
| | | | | | | Replace a runtime check with a compile time assertion. This makes the INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL obsolete. Update #4181.
* rtems: Remove unused barriermp.hSebastian Huber2020-11-261-127/+0
|
* rtems: Move _Partition_Allocate()Sebastian Huber2020-11-241-0/+5
| | | | It is only used by rtems_partition_create().
* rtems: Move _Partition_Initialize()Sebastian Huber2020-11-241-0/+25
| | | | It is only used by rtems_partition_create(). Fix integer types.
* rtems: Move _Partition_Is_buffer_area_aligned()Sebastian Huber2020-11-241-1/+6
| | | | | It is only used by rtems_partition_create(). Move code directly into directive which called the inline function. Add a comment.
* rtems: Move _Partition_Is_buffer_size_aligned()Sebastian Huber2020-11-241-1/+6
| | | | | It is only used by rtems_partition_create(). Move code directly into the directive which called the inline function. Add a comment.
* rtems: Move _Partition_Is_buffer_on_boundary()Sebastian Huber2020-11-241-1/+16
| | | | | It is used only by rtems_partition_return_buffer(). Make the PTCB the first parameter. Rename to _Partition_Is_address_on_buffer_boundary().
* rtems: Move _Partition_Is_buffer_valid()Sebastian Huber2020-11-241-1/+17
| | | | | It is used only in one place. Make the PTCB the first parameter. Rename it to _Partition_Is_address_a_buffer_begin().
* rtems: Remove _Partition_Destroy()Sebastian Huber2020-11-231-1/+1
| | | | It was a trivial function call wrapper used only in one place.
* rtems: Remove _Partition_Free()Sebastian Huber2020-11-231-1/+1
| | | | It was a trivial function call wrapper used only in one place.
* rtems: Move _Partition_Free_buffer()Sebastian Huber2020-11-231-0/+9
| | | | It is only used by rtems_partition_return_buffer().
* rtems: Move _Partition_Allocate_buffer()Sebastian Huber2020-11-231-0/+6
| | | | It is only used by rtems_partition_get_buffer().
* rtems: Canonicalize partition file documentationSebastian Huber2020-11-237-16/+30
|
* rtems: Canonicalize task event file documentationSebastian Huber2020-11-237-17/+27
|