Skip to content
Commit 9a8c3572 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

serial.c: Fix a race condition noted by Stefan Kolb. Between the test if the...

serial.c:  Fix a race condition noted by Stefan Kolb.  Between the test if the TX buffer is full and entering a critical section, bytes may be removed from the TX buffer making the wait unnecessary.  The unnecessary wait is an inefficiency, but not really a problem.  But with USB CDC/ACM it can be a problem because the entire TX buffer may be emptied when we lose the race.  If that happens that uart_putxmitchar() can hang waiting for data to be removed from an empty TX buffer.
parent 369c9426
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment