summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid ISR_LOCK_MEMBER() since it confuses DoxygenSebastian Huber2021-12-096-7/+17
| | | | | If RTEMS_SMP is not defined, then Doxygen adds the comments intended for conditional the lock member to the next member.
* spec: Update location of cadence I2CKinsey Moore2021-12-092-3/+7
| | | | | | When the cadence I2C code was moved to a shared directory, the references were updated but the install locations weren't. This updates the install locations to match what out-of-tree applications expect.
* build: Move test header to right library itemSebastian Huber2021-12-092-3/+5
|
* untar: Make behavior similar to GNU or BSD tarChristian Mauderer2021-12-095-29/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTEMS untar implementation had problems with overwriting or integrating archives into existing directory structures. This patch adapts the behavior to mimic that of a GNU tar or BSD tar and extends the tar01 test to check for the behavior. That is: * If a directory structure exists, the files from the archive will be integrated. Existing files are overwritten. * If a file exists and the archive contains a directory with the same name, the file is removed and a directory is created. In the above example: if l1/l2 is a file it will be overwritten with a new directory. * If a directory exists and the archive contains a file with the same name, the directory will be replaced if it is empty. If it contains files, the result is an error. * An archive also can contain only a file without the parent directories. If in that case one of the parent directories exists as a file extracting the archive results in an error. In the example: if l1/l2 is a file and the archive doesn't contain the directories but only the file l1/l2/x.txt that would be an error. * In case of an error, it is possible that the archive has been partially extracted. Closes #4568
* score: Fix _Workspace_Initialize_for_one_area()Sebastian Huber2021-12-071-14/+20
| | | | | | | In _Workspace_Initialize_for_one_area(), properly check if there is enough free memory available for the configured workspace size. The bug was introduced by commit 3d0620b607ff6459fec9d30efc1e0589bbd010f9.
* libtest: Fix sample reportingSebastian Huber2021-12-071-11/+14
| | | | The sample reporting wronly added values to the wrong bin in some cases.
* libtest: Fix overlap in measurement contextSebastian Huber2021-12-071-2/+2
|
* score: Fix atomic stores for C++Sebastian Huber2021-12-071-3/+3
| | | | Close #4566.
* rtems: Move all Interrupt Manager stuff to intr.hSebastian Huber2021-12-022-2274/+2272
| | | | | | Since the previous Interrupt Manager Extension API moved to the Interrupt Manager, we can move the interfaces to <rtems/rtems/intr.h> so that they are available via #include <rtems.h>.
* rtems: Move scheduler directives to own headerSebastian Huber2021-12-0217-501/+585
| | | | | | Move all rtems_scheduler_* directives to the new header file <rtems/rtems/scheduler.h>. Add a Scheduler Manager API and implementation group.
* libc: Optimize malloc() initializationSebastian Huber2021-11-3019-103/+322
| | | | | | | | | | | | | | | | The BSPs provide memory for the separate C Program Heap initialization via _Memory_Get(). Most BSPs provide exactly one memory area. Only two BSPs provide more than one memory area (arm/altera-cyclone-v and bsps/powerpc/mpc55xxevb). Only if more than one memory area is provided, there is a need to use _Heap_Extend(). Provide two implementations to initialize the separate C Program Heap and let the BSP select one of the implementations based on the number of provided memory areas. This gets rid of a dependency on _Heap_Extend(). It also avoids dead code sections for most BSPs. Change licence to BSD-2-Clause according to file history. Update #3053.
* score: Optimize Workspace Handler initializationSebastian Huber2021-11-3016-91/+350
| | | | | | | | | | | | The BSPs provide memory for the workspace initialization via _Memory_Get(). Most BSPs provide exactly one memory area. Only two BSPs provide more than one memory area (arm/altera-cyclone-v and bsps/powerpc/mpc55xxevb). Only if more than one memory area is provided, there is a need to use _Heap_Extend(). Provide two implementations to initialize the workspace handler and let the BSP select one of the implementations based on the number of provided memory areas. This gets rid of a dependency on _Heap_Extend(). It also avoids dead code sections for most BSPs.
* build: Use common objects item for get memorySebastian Huber2021-11-30117-84/+210
|
* score: Split wkspace.cSebastian Huber2021-11-304-15/+100
| | | | Splitting the file avoids unnecessary link-time dependencies.
* wkspace.c: Change license to BSD-2-ClauseSebastian Huber2021-11-301-5/+24
| | | | | | Change licence according to file history. Update #3053.
* arm: Add AARCH32_PMSA_DATA_READ_WRITE_DEFAULTSebastian Huber2021-11-301-8/+28
| | | | | | | Add default memory attributes for read-write data. The actual attributes depend on the RTEMS_SMP build option. Update #4202.
* arm: Fix AARCH32_PMSA_DATA_READ_WRITE_CACHEDSebastian Huber2021-11-301-1/+1
| | | | | | | Fix definition of AARCH32_PMSA_DATA_READ_WRITE_CACHED. Since AARCH32_PMSA_ATTR_AP_EL1_RW_EL0_NO is zero, this fix is only cosmetic. Update #4202.
* */aclocal/*: Remove remnants of autoconf/automae build systemJoel Sherrill2021-11-2954-1191/+0
| | | | Updates #4081.
* bsp_specs: Delete last remnants of these.Joel Sherrill2021-11-2986-3/+0
| | | | Updates #3937.
* build: Remove trailing white spaceSebastian Huber2021-11-292-2/+2
|
* sparc: Add workaround for GRLIB-TN-0011Sebastian Huber2021-11-261-0/+12
| | | | | | | | | | Affected components are the GR712RC, UT699, UT699E, UT700, and LEON3FT-RTAX. Strictly, the workaround is only necessary if the MMU is enabled. Use __FIX_LEON3FT_B2BST to enable the workaround. This is not 100% appropriate, but the best thing we can use to enable the workaround. Close #4551.
* rtems: Replace "precision" with "resolution"Sebastian Huber2021-11-231-32/+32
| | | | Resolution is the right term for the documented property.
* score: Properly continue the thread during restartSebastian Huber2021-11-234-16/+12
| | | | | | | | | | The _Thread_queue_Extract() does not deal with potential priority updates and the SMP locking protocol handling. Use _Thread_queue_Continue(). For the POSIX signals processing this is currently probably unnecessary, however, the use case is similar to the restart so use the same appoach. Close #4546.
* score: _Thread_queue_Surrender_no_priority()Sebastian Huber2021-11-231-15/+1
| | | | | | | Simplify _Thread_queue_Surrender_no_priority() and use _Thread_queue_Resume(). Update #4546.
* score: Move _Thread_queue_Extract()Sebastian Huber2021-11-234-35/+67
| | | | | | | Move _Thread_queue_Extract() since this function is not used by the core services (threads, semaphores, mutexes, message queues). Update #4546.
* score: Simplify thread wait state handlingSebastian Huber2021-11-2313-58/+29
| | | | | | | | | | Remove the THREAD_WAIT_STATE_READY_AGAIN and simply use the initial value to indicate that a thread does not wait on something. Rename THREAD_WAIT_FLAGS_INITIAL to THREAD_WAIT_STATE_READY. This change is necessary so that _Thread_Continue() can be called for threads which never waited on something (for example dormant threads). Update #4546.
* score: Add _Thread_MP_Extract_proxy()Sebastian Huber2021-11-239-54/+78
| | | | | | | | Remove _Thread_queue_Extract_with_proxy() and move the proxy extraction to _Thread_MP_Extract_proxy(). Move similar code blocks of the previous caller of _Thread_queue_Extract_with_proxy() to helper functions. Update #4546.
* score: Remove thread timer earlierSebastian Huber2021-11-231-2/+2
| | | | | | | The earlier we remove the thread timer the less likely is a superfluous thread timeout processing. Update #4546.
* score: Restrict affinity for EDF SMP schedulerSebastian Huber2021-11-231-6/+27
| | | | | | | | | | | | | | | | | | The SMP EDF scheduler supports a one-to-one and one-to-all thread to processor affinity. It accepted affinity sets which are a proper subset of the online processor containing at least two processors owned by the scheduler. In this case it used a one-to-one thread to processor affinity. This leads to undefined behaviour if a processor is removed since the higher level check in rtems_scheduler_remove_processor() does not account for this implementation detail. Restrict the affinity set accepted by the SMP EDF scheduler to 1. all online processors, or 2. exactly one processor owned by the scheduler. Close #4545.
* rtems: Fix rtems_scheduler_remove_processor()Sebastian Huber2021-11-233-14/+61
| | | | | | | | | | | | | | | | | | Return an error status for the following error condition in rtems_scheduler_remove_processor(): While an attempt is made to remove a processor from a scheduler, while the processor is the only processor owned by the scheduler, if a thread exists which uses the scheduler as a helping scheduler, then the processor shall not be removed. The reason is that ask for help requests and withdraw node requests are processed asynchronously in any order. An ask for help request carried out on a scheduler without a processor is undefined behaviour. Update error status description. Update #4544.
* score: Fix assertion in SMP scheduler frameworkSebastian Huber2021-11-231-6/+9
| | | | | | Properly assert that the scheduled chain is not empty. Fix formatting. Close #4531.
* score: Rework ask for help requestsSebastian Huber2021-11-236-102/+112
| | | | | | | | Process ask for help requests on the current processor. This avoids using inter-processor interrupts to make the system behaviour a bit more predictable. Update #4531.
* score: _Scheduler_SMP_Schedule_highest_ready()Sebastian Huber2021-11-236-68/+59
| | | | | | | | | Simplify callers of _Scheduler_SMP_Schedule_highest_ready(). Move the node state change and the extraction from scheduled into _Scheduler_SMP_Schedule_highest_ready(). Move the idle thread release to the caller which have more information about the presence of an idle thread. Update #4531.
* score: Remove victim thread from CPU allocationSebastian Huber2021-11-233-80/+65
| | | | Update #4531.
* score: Move _Scheduler_Unblock_node()Sebastian Huber2021-11-232-71/+35
| | | | | | | Move _Scheduler_Unblock_node() into _Scheduler_SMP_Unblock(). This simplifies the code and makes it easier to review. Update #4531.
* score: Move _Scheduler_Block_node()Sebastian Huber2021-11-232-81/+46
| | | | | | | Move _Scheduler_Block_node() into _Scheduler_SMP_Block(). This simplifies the code and makes it easier to review. Update #4531.
* score: Simplify _Scheduler_SMP_Yield()Sebastian Huber2021-11-231-10/+1
| | | | | There is not need to actively ask for help in a yield operation. The helping is already done on demand by the other scheduler operations.
* score: Fix SMP EDF priority group orderingSebastian Huber2021-11-231-13/+61
| | | | | | | | | | | | | | | | | | | | | | | | The SMP EDF scheduler supports one-to-one and one-to-all thread to processor affinities. The one-to-one thread to processor affinity introduces a constraint on the ordering of threads. The implementation uses one ready queue for threads which have a one-to-all affinity and one for each one-to-one affinity group. To order threads across the ready queues, a generation number is used. However, the approach to update the generation number each time a thread is inserted into a ready queue was wrong. The generation number needs to be updated only in the enqueue and enqueue scheduled operations where an insert priority is available. The scheduled chain needs to take the generation number into account. An example scenario which shows the bug is this. Let T be a high priority task affine to processor X. Let A be a lower priority task affine to processor X. Let B be a lower priority task with no affinity to a particular processor which executes on processor Y. Let B be in the same priority group than A and after A. Let T set the affinity to all processors. Now A (higher priority relative to B) should execute on X and T (high priority) should execute on Y. Close #4534.
* score: Add node to insert to Chain_Node_orderSebastian Huber2021-11-236-21/+59
| | | | | | This allows to use additional members of the nodes for comparision. Update #4534.
* score: Rework idle handling in SMP schedulersSebastian Huber2021-11-2310-514/+686
| | | | | | | | | | | | | | | | | | This patch fixes an issue with the idle thread handling in the SMP scheduler framework used for the MrsP locking protocol. The approach to use a simple chain of unused idle threads is broken for schedulers which support thread to processor affinity. The reason is that the thread to processor affinity introduces another ordering indicator which may under certain conditions lead to a reordering of idle threads in the scheduled chain. This reordering is not propagated to the chain of unused idle threads. This could lead to use an idle thread for a sticky scheduler node which is already in use. This locks up the system in infinite loops in the thread context switch procedure. To fix this, the SMP scheduler implementations must now provide callbacks to get and release an unused idle thread. Update #4531.
* score: Add SMP scheduler make/clean stickySebastian Huber2021-11-2319-91/+741
| | | | | | | | | | | | | | | | | | | | This patch fixes the following broken behaviour: While a thread is scheduled on a helping scheduler, while it does not own a MrsP semaphore, if it obtains a MrsP semaphore, then no scheduler node using an idle thread and the ceiling priority of the semaphore is unblocked for the home scheduler. This could lead to priority inversion issues and is not in line with the MrsP protocol. Introduce two new scheduler operations which are only enabled if RTEMS_SMP is defined. The operations are used to make the scheduler node of the home scheduler sticky and to clean the sticky property. This helps to keep the sticky handing out of the frequently used priority update operation. Close #4532.
* score: Add SMP scheduler idle exchange callbackSebastian Huber2021-11-231-0/+19
| | | | Update #4531.
* score: Optimize SMP EDF move to ready operationSebastian Huber2021-11-231-7/+13
| | | | | | | | If a node is moved from the scheduled chain to the ready queue, then we know that it is the highest priority ready node. So, it can be prepended to the ready queue without doing any comparisons. Update #4531.
* score: Rework affine ready queue handlingSebastian Huber2021-11-232-42/+77
| | | | | | | | Rework the handling of the affine ready queue for the EDF SMP scheduler. Do the queue handling in the node insert, move, and extract operations. Remove the queue handling from _Scheduler_EDF_SMP_Allocate_processor(). Update #4531.
* score: Use extract from scheduled callbacksSebastian Huber2021-11-236-5/+41
| | | | | | | Use the extract from scheduled callback provided by the scheduler implementation in the SMP scheduler framework. Update #4531.
* score: Remove return value from enqueue scheduledSebastian Huber2021-11-236-36/+40
| | | | | | The return value was unused. Remove it. Update #4531.
* score: Scheduler insert after moveSebastian Huber2021-11-231-5/+5
| | | | | | | | Insert nodes after moving the second node to reduce the items in the data structure for the insert operation. This also avoids having two nodes for the same processor inserted into the scheduled chain. Update #4531.
* score: Add missing idle thread exchangesSebastian Huber2021-11-231-0/+18
| | | | Update #4531.
* score: Add missing idle thread releasesSebastian Huber2021-11-231-0/+12
| | | | Update #4531.
* score: Simplify _Scheduler_Exchange_idle_thread()Sebastian Huber2021-11-232-17/+11
| | | | | | Remove superfluous idle parameter. Update #4531.