kernel: fatal: allow tests to continue upon spurious ISR trigger
We want to be regression-testing the spurious ISR functionality. Therefore, in z_fatal_error() we need to allow a test to continue if an error has occured due to a spurious IRQ being triggered. Only in test mode, wee allow the function to return without an error. In normal mode the current thread will be aborted. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
49fb5d0812
commit
9d184286d3
1 changed files with 8 additions and 0 deletions
|
@ -163,6 +163,14 @@ void z_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
|
||||||
arch_irq_unlock(key);
|
arch_irq_unlock(key);
|
||||||
return;
|
return;
|
||||||
#endif /* CONFIG_STACK_SENTINEL */
|
#endif /* CONFIG_STACK_SENTINEL */
|
||||||
|
} else {
|
||||||
|
/* Abort the thread only if the fault is not due to
|
||||||
|
* a spurious ISR handler triggered.
|
||||||
|
*/
|
||||||
|
if (reason == K_ERR_SPURIOUS_IRQ) {
|
||||||
|
arch_irq_unlock(key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /*CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION */
|
#endif /*CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue