Skip to content

Commit 833f951

Browse files
committed
Merge pull request #1164 from 0xc0170/fix_buffer_index
CircularBuffer - volatile full flag + indexes
2 parents 7833dcb + 408956f commit 833f951

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/mbed/api/CircularBuffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class CircularBuffer {
8888

8989
private:
9090
T _pool[BufferSize];
91-
CounterType _head;
92-
CounterType _tail;
93-
bool _full;
91+
volatile CounterType _head;
92+
volatile CounterType _tail;
93+
volatile bool _full;
9494
};
9595

9696
}

0 commit comments

Comments
 (0)