File tree 4 files changed +829
-799
lines changed
libraries/ESP8266WiFi/src
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() {
90
90
#endif
91
91
}
92
92
93
+ extern " C" bool can_yield () {
94
+ return cont_can_yield (g_pcont);
95
+ }
93
96
94
97
static inline void esp_yield_within_cont () __attribute__((always_inline));
95
98
static void esp_yield_within_cont () {
@@ -98,7 +101,7 @@ static void esp_yield_within_cont() {
98
101
}
99
102
100
103
extern " C" void esp_yield () {
101
- if (cont_can_yield (g_pcont )) {
104
+ if (can_yield ( )) {
102
105
esp_yield_within_cont ();
103
106
}
104
107
}
@@ -109,7 +112,7 @@ extern "C" void esp_schedule() {
109
112
}
110
113
111
114
extern " C" void __yield () {
112
- if (cont_can_yield (g_pcont )) {
115
+ if (can_yield ( )) {
113
116
esp_schedule ();
114
117
esp_yield_within_cont ();
115
118
}
@@ -121,7 +124,7 @@ extern "C" void __yield() {
121
124
extern " C" void yield (void ) __attribute__ ((weak, alias(" __yield" )));
122
125
123
126
extern " C" void optimistic_yield (uint32_t interval_us) {
124
- if (cont_can_yield (g_pcont ) &&
127
+ if (can_yield ( ) &&
125
128
(system_get_time () - s_micros_at_task_start) > interval_us)
126
129
{
127
130
yield ();
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ extern "C" {
14
14
15
15
extern bool timeshift64_is_set;
16
16
17
+ bool can_yield ();
17
18
void esp_yield ();
18
19
void esp_schedule ();
19
20
void tune_timeshift64 (uint64_t now_us);
You can’t perform that action at this time.
0 commit comments