Skip to content

Commit

Permalink
yield() without panic() can do the right thing in CONT and SYS alike.
Browse files Browse the repository at this point in the history
  • Loading branch information
dok-net committed Mar 10, 2020
1 parent ba73d82 commit cfde64b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cores/esp8266/core_esp8266_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,10 @@ extern "C" IRAM_ATTR void esp_schedule() {
}

extern "C" void __yield() {
esp_schedule();
if (can_yield()) {
esp_schedule();
esp_yield_within_cont();
}
else {
panic();
}
}

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

0 comments on commit cfde64b

Please sign in to comment.