]> granicus.if.org Git - esp-idf/commit
sleep: fix deadlock in esp_timer_impl_advance after light sleep
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 4 May 2018 04:50:39 +0000 (12:50 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 9 May 2018 14:52:50 +0000 (22:52 +0800)
commit8c307a5720c66bd80062199a1e9ac3699261931d
treeb23207f10003bf10cd310dce2a3aff3a8bef6d6d
parent296b280801441f1f10c5660c2f4d54ada4aa0dbd
sleep: fix deadlock in esp_timer_impl_advance after light sleep

When light sleep is started, the other CPU gets halted using DPORT
stall mechanism. This can happen while it is inside an esp_timer
critical section, which may lead to a deadlock. This change adds
functions to take and release esp_timer lock before entering
DPORT critical section, preventing the deadlock.
components/esp32/esp_timer_esp32.c
components/esp32/esp_timer_impl.h
components/esp32/sleep_modes.c
components/esp32/test/test_sleep.c