I am trying to find a reason on why Infineon decided to use in it's Tricore architecture linked lists for saving the context of a task (when switching to another task).
The context is saved in fixed size/structure chunks in RAM. Each CSA (context saving area) has a "linkword" which points to the next free CSA address. The current CSA is stored in a CPU register (PCXI) so that it can restore the context of the previous task, when the current one finishes. Usually the RAM region for saving these CSA is pre allocated using linker scripts.
So given all of the above conditions, I now wonder why it is implemented this way(linked-lists), since it could have also been implemented as a stack (even easier given the fixed size/structure of the CSA).
Later edit: I have realized first then read somewhere, that in case of linked lists one can expand the CSA area in the trap that is triggered in case of free CSA depletion. This can be easily done since the linked lists do not care about the RAM location of the nodes, so in consequence one can allocate dynamically more nodes to the existing list in case it is not sufficient.