Hi, not sure if I missed something but I’m lacking a straightforward solution to the following problem:
- Two tasks, T1 and T2
- PRIO(T1) > PRIO(T2)
- T1 does NOT use dynamic allocation at all (e.g. deferred ISR task), DOES have strict latency requirements
- T2 USES dynamic allocation (e.g. networking task), does NOT have “strict” latency requirements
- all the dynamic memory management routines (for sake of generality I guess) suspend all the tasks - even those that are guaranteed not to use the dynamic allocation and thus “priority inversion” occurs even without shared resource
regarding the actual ISRs (at least on cortex-M architecture) the clever solution exists to disable IRQs selectively up to some level (which FreeRTOS uses in critical section implementation)
Would it be feasible (and desirable) to have similar solution working with task suspension - e.g. suspending only tasks up to certain priority?
Or would you rather suggest modification of the memory management to avoid using suspension and use a mutex instead?