From 4d30fd5e6a7548b9aab7977a27a575fe0dff4b13 Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" Date: Sat, 16 Nov 2019 12:22:41 +0100 Subject: [PATCH] Weak binding lessens version dependency between ESP8266 and MT library CoopTask. --- cores/esp8266/core_esp8266_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);