File tree Expand file tree Collapse file tree 4 files changed +829
-799
lines changed
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 4 files changed +829
-799
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ void preloop_update_frequency() {
9090#endif
9191}
9292
93+ extern " C" bool can_yield () {
94+ return cont_can_yield (g_pcont);
95+ }
9396
9497static inline void esp_yield_within_cont () __attribute__((always_inline));
9598static void esp_yield_within_cont () {
@@ -98,7 +101,7 @@ static void esp_yield_within_cont() {
98101}
99102
100103extern " C" void esp_yield () {
101- if (cont_can_yield (g_pcont )) {
104+ if (can_yield ( )) {
102105 esp_yield_within_cont ();
103106 }
104107}
@@ -109,7 +112,7 @@ extern "C" void esp_schedule() {
109112}
110113
111114extern " C" void __yield () {
112- if (cont_can_yield (g_pcont )) {
115+ if (can_yield ( )) {
113116 esp_schedule ();
114117 esp_yield_within_cont ();
115118 }
@@ -121,7 +124,7 @@ extern "C" void __yield() {
121124extern " C" void yield (void ) __attribute__ ((weak, alias(" __yield" )));
122125
123126extern " C" void optimistic_yield (uint32_t interval_us) {
124- if (cont_can_yield (g_pcont ) &&
127+ if (can_yield ( ) &&
125128 (system_get_time () - s_micros_at_task_start) > interval_us)
126129 {
127130 yield ();
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ extern "C" {
1414
1515extern bool timeshift64_is_set;
1616
17+ bool can_yield ();
1718void esp_yield ();
1819void esp_schedule ();
1920void tune_timeshift64 (uint64_t now_us);
You can’t perform that action at this time.
0 commit comments