diff options
author | Diego Ismirlian <dismirlian@gmail.com> | 2019-10-02 18:37:02 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian@gmail.com> | 2019-10-02 18:37:02 -0300 |
commit | 9aa1b6f9929be286eaf5b6cb3a392f45542ce787 (patch) | |
tree | 0707d4fc43bcbc1255dc8cf7e1d487bf24f7dab5 /os | |
parent | 3ba4c222b8250e07dc16d533b382395b5549230d (diff) | |
download | ChibiOS-Contrib-9aa1b6f9929be286eaf5b6cb3a392f45542ce787.tar.gz ChibiOS-Contrib-9aa1b6f9929be286eaf5b6cb3a392f45542ce787.tar.bz2 ChibiOS-Contrib-9aa1b6f9929be286eaf5b6cb3a392f45542ce787.zip |
RTT/SystemView bindings: avoid race condition on ISR exit
Diffstat (limited to 'os')
-rw-r--r-- | os/various/segger_bindings/SYSTEMVIEW/SEGGER_SYSVIEW_ChibiOS.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/various/segger_bindings/SYSTEMVIEW/SEGGER_SYSVIEW_ChibiOS.h b/os/various/segger_bindings/SYSTEMVIEW/SEGGER_SYSVIEW_ChibiOS.h index c3e0384..be73a4f 100644 --- a/os/various/segger_bindings/SYSTEMVIEW/SEGGER_SYSVIEW_ChibiOS.h +++ b/os/various/segger_bindings/SYSTEMVIEW/SEGGER_SYSVIEW_ChibiOS.h @@ -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) { \ |