Skip to content

Commit cfde64b

Browse files
committed
yield() without panic() can do the right thing in CONT and SYS alike.
1 parent ba73d82 commit cfde64b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cores/esp8266/core_esp8266_main.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,10 @@ extern "C" IRAM_ATTR void esp_schedule() {
113113
}
114114

115115
extern "C" void __yield() {
116+
esp_schedule();
116117
if (can_yield()) {
117-
esp_schedule();
118118
esp_yield_within_cont();
119119
}
120-
else {
121-
panic();
122-
}
123120
}
124121

125122
extern "C" void yield(void) __attribute__ ((weak, alias("__yield")));

0 commit comments

Comments
 (0)