Refactor circular buffer test to platform folder

pull/7890/head
Deepika 2018-08-24 16:53:35 -05:00
parent 546743aeb0
commit 4e263b17b9
2 changed files with 3 additions and 3 deletions

View File

@ -92,12 +92,12 @@ public:
core_util_critical_section_enter(); core_util_critical_section_enter();
if (full()) { if (full()) {
_tail++; _tail++;
if(_tail == BufferSize) { if (_tail == BufferSize) {
_tail = 0; _tail = 0;
} }
} }
_pool[_head++] = data; _pool[_head++] = data;
if(_head == BufferSize) { if (_head == BufferSize) {
_head = 0; _head = 0;
} }
if (_head == _tail) { if (_head == _tail) {
@ -117,7 +117,7 @@ public:
core_util_critical_section_enter(); core_util_critical_section_enter();
if (!empty()) { if (!empty()) {
data = _pool[_tail++]; data = _pool[_tail++];
if(_tail == BufferSize) { if (_tail == BufferSize) {
_tail = 0; _tail = 0;
} }
_full = false; _full = false;