We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7d3226 commit da778bdCopy full SHA for da778bd
libraries/net/VodafoneUSBModem/core/MtxCircBuffer.h
@@ -55,19 +55,13 @@ class MtxCircBuffer
55
void queue(T k)
56
{
57
mtx.lock();
58
- while (((write + 1) % size) == read) //if (isFull())
59
- {
60
- /*while((((write + 1) % size) == read))
61
- {*/
62
- mtx.unlock();
63
- Thread::wait(10);
64
- mtx.lock();
65
- /*}*/
66
- //read++;
67
- //read %= size;
68
- }
69
buf[write++] = k;
70
write %= size;
+ if (isFull())
+ {
+ read++;
+ read %= size;
+ }
71
mtx.unlock();
72
}
73
0 commit comments