INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT

Chris Johns chrisj at rtems.org
Tue Feb 20 00:55:08 UTC 2018


On 20/02/2018 00:13, Matthew J Fletcher wrote:
> All,
> 
> Replying to my own post, with CPU_ENABLE_ROBUST_THREAD_DISPATCH set FALSE i get
> a fatal exception, this on a Cortex-M7, rtems 5.0.0 from git.
> 
> I think i will have to work around the new behavior somehow.
> 

I would view this as implementing the correct behaviour. :)

The performance change does generate this runtime error and like you I have
tripped over it. What I learnt is this error exposes incorrect behaviour that
use to run before now however this has changed with SMP. In all cases what I was
doing was wrong and needed to be fixed.

Masking interrupts or using interrupt masking as a cheap lock on an SMP target
provides you with no protection. All it does is stop the masked core from
receiving interrupts and any code without lock protection can execute
concurrently via another core.

You could argue that you are not using an SMP target so why should it matter
however there are ways to handle these cases that are better and end up with
more robust applications.

I hope this helps explain why you are seeing this error.

Chris


More information about the users mailing list