3 ms·
> I'm sure we all know what happens when your ISR quietly does a new while some other part of your code is holding one of the locks deep in malloc. Yeah, what
by eternal_july 10y ago
> I'm sure we all know what happens when your ISR quietly does a new while some other part of your code is holding one of the locks deep in malloc.
Yeah, what happens is that such code does not pass code review :)
In 99.99% of cases an ISR should only set some flag, that is then checked by code, running in user mode (or whatever it is called for your platform). Then the real work is done in user mode. The remaining 0.01% of cases does not involve using dynamic memory either.