Add peek method to circular buffer.

This commit is contained in:
Michael Bebenita
2010-07-28 00:01:06 -07:00
committed by Graydon Hoare
parent 17fa6bfd9a
commit d6cba83322
2 changed files with 6 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ circular_buffer::dequeue(void *dst) {
}
uint8_t *
circular_buffer::peek() {
return &_buffer[_next];
}
bool
circular_buffer::is_empty() {
return _unread == 0;