diff --git a/cores/esp8266/core_esp8266_main.cpp b/cores/esp8266/core_esp8266_main.cpp index 805dca43dc..4818852fcc 100644 --- a/cores/esp8266/core_esp8266_main.cpp +++ b/cores/esp8266/core_esp8266_main.cpp @@ -100,12 +100,14 @@ static void esp_yield_within_cont() { run_scheduled_recurrent_functions(); } -extern "C" void esp_yield() { +extern "C" void __esp_yield() { if (can_yield()) { esp_yield_within_cont(); } } +extern "C" void esp_yield() __attribute__ ((weak, alias("__esp_yield"))); + extern "C" void esp_schedule() { // always on CONT stack here ets_post(LOOP_TASK_PRIORITY, 0, 0);