Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Socket lwip-sys lwip
Fork of AbitUSBModem by
Diff: core/MtxCircBuffer.h
- Revision:
- 91:7b311719374d
- Parent:
- 16:02db4f537955
--- a/core/MtxCircBuffer.h Thu Jun 27 12:16:30 2013 +0000
+++ b/core/MtxCircBuffer.h Fri Sep 20 10:40:58 2013 +0000
@@ -54,6 +54,10 @@
void queue(T k)
{
+ // XXX Some modems spew stuff out on multiple interfaces
+ // which can cause the circular buffer to block if
+ // the unread queues are not flushed. Need to make this
+ // non-blocking: just overwrite oldest chars for example.
mtx.lock();
while (((write + 1) % size) == read) //if (isFull())
{
