reserve <-- w --> n reserved Blocks are asynchronously written from the moment the method is called
| 102 | // reserve <-- w --> n |
| 103 | // reserved Blocks are asynchronously written from the moment the method is called |
| 104 | void CircularBlockBuffer::incrementWritePointer(int n, bool blocking) { |
| 105 | int _available = available_write(); |
| 106 | |
| 107 | if (_available < n) { |
| 108 | _overflow_count += n - _available; |
| 109 | } |
| 110 | |
| 111 | _reserve_write_total = max(0, _reserve_write_total - _reserve_write); |
| 112 | _reserve_write = blocking ? n : 0; |
| 113 | _reserve_write_total += _reserve_write; |
| 114 | |
| 115 | // points to next available write Block |
| 116 | _writeBlock = positiveOffset(_writeBlock, n); |
| 117 | _buffer_fill += n; |
| 118 | } |
| 119 | |
| 120 | void CircularBlockBuffer::incrementReadPointer(int n, bool blocking) { |
| 121 | int _available = available_read(); |