1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Move yield start time set to esp_yield_within_cont

This commit is contained in:
Dirk O. Kaar 2019-11-19 13:49:19 +01:00
parent 598361f3aa
commit 3d7423bdde

View File

@ -97,6 +97,7 @@ extern "C" bool can_yield() {
static inline void esp_yield_within_cont() __attribute__((always_inline));
static void esp_yield_within_cont() {
cont_yield(g_pcont);
s_cycles_since_yield_start = ESP.getCycleCount();
run_scheduled_recurrent_functions();
}
@ -116,7 +117,6 @@ extern "C" void __yield() {
if (can_yield()) {
esp_schedule();
esp_yield_within_cont();
s_cycles_since_yield_start = ESP.getCycleCount();
}
else {
panic();
@ -134,7 +134,6 @@ extern "C" void optimistic_yield(uint32_t interval_us) {
}
}
// Replace ets_intr_(un)lock with nestable versions
extern "C" void IRAM_ATTR ets_intr_lock() {
if (ets_intr_lock_stack_ptr < ETS_INTR_LOCK_NEST_MAX)