Merge branch 'bugfix/fix_timer_deleted_and_run_broken_callback_v3.2' into 'release/v3.2'

esp_timer: fix the bug that when timeout of timer happens try to run callback(v3.2)

See merge request espressif/esp-idf!6767
This commit is contained in:
Jiang Jiang Jian 2019-11-25 10:34:26 +08:00
commit 7a557368e3

View file

@ -286,8 +286,10 @@ static void timer_process_alarm(esp_timer_dispatch_t dispatch_method)
uint64_t callback_start = now;
s_timer_in_callback = it;
#endif
esp_timer_cb_t callback = it->callback;
void* arg = it->arg;
timer_list_unlock();
(*it->callback)(it->arg);
(*callback)(arg);
timer_list_lock();
now = esp_timer_impl_get_time();
#if WITH_PROFILING