RTT/SystemView bindings: avoid race condition on ISR exit

This commit is contained in:
Diego Ismirlian 2019-10-02 18:37:02 -03:00
parent 3ba4c222b8
commit 9aa1b6f992
1 changed files with 3 additions and 0 deletions

View File

@ -266,11 +266,14 @@ void SYSVIEW_ChibiOS_Start(U32 SysFreq, U32 CPUFreq, const char *isr_description
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
_CH_CFG_IRQ_EPILOGUE_HOOK(); \
port_lock_from_isr(); \
_dbg_enter_lock(); \
if (_isr_is_tail() && chSchIsPreemptionRequired()) { \
SEGGER_SYSVIEW_RecordExitISRToScheduler(); \
} else { \
SEGGER_SYSVIEW_RecordExitISR(); \
} \
_dbg_leave_lock(); \
}
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \