Skip to content

Commit 3d7423b

Browse files
committed
Move yield start time set to esp_yield_within_cont
1 parent 598361f commit 3d7423b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/esp8266/core_esp8266_main.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ extern "C" bool can_yield() {
9797
static inline void esp_yield_within_cont() __attribute__((always_inline));
9898
static void esp_yield_within_cont() {
9999
cont_yield(g_pcont);
100+
s_cycles_since_yield_start = ESP.getCycleCount();
100101
run_scheduled_recurrent_functions();
101102
}
102103

@@ -116,7 +117,6 @@ extern "C" void __yield() {
116117
if (can_yield()) {
117118
esp_schedule();
118119
esp_yield_within_cont();
119-
s_cycles_since_yield_start = ESP.getCycleCount();
120120
}
121121
else {
122122
panic();
@@ -134,7 +134,6 @@ extern "C" void optimistic_yield(uint32_t interval_us) {
134134
}
135135
}
136136

137-
138137
// Replace ets_intr_(un)lock with nestable versions
139138
extern "C" void IRAM_ATTR ets_intr_lock() {
140139
if (ets_intr_lock_stack_ptr < ETS_INTR_LOCK_NEST_MAX)

0 commit comments

Comments
 (0)