Skip to content

Commit

Permalink
Add total size api
Browse files Browse the repository at this point in the history
  • Loading branch information
dragorn committed Mar 20, 2018
1 parent b8864ef commit 0ac4711
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions simple_ringbuf_c.c
Expand Up @@ -76,6 +76,12 @@ size_t kis_simple_ringbuf_used(kis_simple_ringbuf_t *ringbuf) {
return ringbuf->length;
}

/* Get total space
* */
size_t kis_simple_ringbuf_size(kis_simple_ringbuf_t *ringbuf) {
return ringbuf->buffer_sz;
}

/* Append data
*
* Returns amount written
Expand Down
4 changes: 4 additions & 0 deletions simple_ringbuf_c.h
Expand Up @@ -57,6 +57,10 @@ size_t kis_simple_ringbuf_available(kis_simple_ringbuf_t *ringbuf);
*/
size_t kis_simple_ringbuf_used(kis_simple_ringbuf_t *ringbuf);

/* Get total size
*/
size_t kis_simple_ringbuf_size(kis_simple_ringbuf_t *ringbuf);

/* Append data
*
* Returns amount written
Expand Down

0 comments on commit 0ac4711

Please sign in to comment.