From cb6b30a47de5e81f54f548e447a2615aac00d63e Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" <19971886+dok-net@users.noreply.github.com> Date: Tue, 19 Nov 2019 08:43:28 +0100 Subject: [PATCH] Weak binding lessens version dependency between ESP8266 and MT library CoopTask. (#6790) --- 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 805dca43d..4818852fc 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);