1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Weak binding lessens version dependency between ESP8266 and MT library CoopTask. (#6790)

This commit is contained in:
Dirk O. Kaar 2019-11-19 08:43:28 +01:00 committed by Develo
parent 6768116b8c
commit cb6b30a47d

View File

@ -100,12 +100,14 @@ static void esp_yield_within_cont() {
run_scheduled_recurrent_functions(); run_scheduled_recurrent_functions();
} }
extern "C" void esp_yield() { extern "C" void __esp_yield() {
if (can_yield()) { if (can_yield()) {
esp_yield_within_cont(); esp_yield_within_cont();
} }
} }
extern "C" void esp_yield() __attribute__ ((weak, alias("__esp_yield")));
extern "C" void esp_schedule() { extern "C" void esp_schedule() {
// always on CONT stack here // always on CONT stack here
ets_post(LOOP_TASK_PRIORITY, 0, 0); ets_post(LOOP_TASK_PRIORITY, 0, 0);