Skip to content

Commit 99ed6fc

Browse files
committed
Add comment about how optimistic_yield() is safe for SYS, like in callbacks.
1 parent 971ad28 commit 99ed6fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: cores/esp8266/core_esp8266_main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ extern "C" void __yield() {
185185

186186
extern "C" void yield(void) __attribute__ ((weak, alias("__yield")));
187187

188+
// In CONT, actually performs yield() only once the given time interval
189+
// has elapsed since the last time yield() occured. Whereas yield() panics
190+
// in SYS, optimistic_yield() additionally is safe to call and does nothing.
188191
extern "C" void optimistic_yield(uint32_t interval_us) {
189192
const uint32_t intvl_cycles = interval_us *
190193
#if defined(F_CPU)

0 commit comments

Comments
 (0)