Skip to content

Commit

Permalink
Use schedule() to yield in Serial
Browse files Browse the repository at this point in the history
  - Replace fiber_sleep(0) with schedule() to ensure safety when
    fiber_wake_on_event() is used.
  • Loading branch information
finneyj committed Oct 9, 2020
1 parent 0ad17a1 commit 47464be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/driver-models/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void Serial::send(SerialMode mode)
while(txBufferedSize() > 0);

if(mode == SYNC_SLEEP)
fiber_sleep(0);
schedule();
}

/**
Expand Down

0 comments on commit 47464be

Please sign in to comment.