From aa6b93169825738230d0b3c486d62ba3ed0ed2db 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 1eece6c501..894fd54188 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;