Task Stack Sharing
In order to save RAM it is possible that different basic tasks share the same task stack. Tasks which fulfill the following requirements share a stack:
- Basic tasks which have the same configured priority.
- Basic tasks which are non-preemptive and are configured to share stacks. Within such basic tasks the call of the OS service Schedule() is not allowed.
- Basic tasks which share an internal resource and are configured to share stacks. Within such basic tasks the call of the OS service Schedule() is not allowed.
The size of the shared task stack is the maximum of all stack sizes of tasks which share the stack.
Note: Stack sharing of tasks can only be achieved between tasks which are assigned to the same core!
ISR Stack Sharing
In order to save RAM it is possible that different category 2 ISRs share the same ISR stack.
- All category 2 ISRs which are not nestable can share one stack.
- All Category 2 ISRs which have the same priority can share one stack.
The size of the shared ISR stack is the maximum of all stack sizes of ISRs which share the stack.
Note: Stack sharing of ISRs can only be achieved between ISRs which are assigned to the same core!