From fd68ba0d642bca2bc40946dcba6ccefdcbde70e4 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Sun, 27 May 2018 13:15:00 -0500 Subject: [PATCH] Fix possible bug with SysTimer Ensure the SysTimer isn't added to the timer list twice by adding an extra call to remove() inside suspend(). --- rtos/TARGET_CORTEX/SysTimer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rtos/TARGET_CORTEX/SysTimer.cpp b/rtos/TARGET_CORTEX/SysTimer.cpp index 8d09532bf7..0a260ce45c 100644 --- a/rtos/TARGET_CORTEX/SysTimer.cpp +++ b/rtos/TARGET_CORTEX/SysTimer.cpp @@ -74,6 +74,7 @@ void SysTimer::suspend(uint32_t ticks) { core_util_critical_section_enter(); + remove(); schedule_tick(ticks); _suspend_time_passed = false; _suspended = true;