Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: platform/mbed_critical.c
- Revision:
- 167:e84263d55307
- Parent:
- 160:d5399cc887bb
- Child:
- 170:19eb464bc2be
--- a/platform/mbed_critical.c Thu Jun 08 15:02:37 2017 +0100 +++ b/platform/mbed_critical.c Wed Jun 21 17:46:44 2017 +0100 @@ -37,6 +37,22 @@ #endif } +bool core_util_is_isr_active(void) +{ +#if defined(__CORTEX_A9) + switch(__get_CPSR() & 0x1FU) { + case MODE_USR: + case MODE_SYS: + return false; + case MODE_SVC: + default: + return true; + } +#else + return (__get_IPSR() != 0U); +#endif +} + MBED_WEAK void core_util_critical_section_enter(void) { bool interrupts_disabled = !core_util_are_interrupts_enabled();