aboutsummaryrefslogtreecommitdiffstats
path: root/src/ringbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ringbuf.h')
-rw-r--r--src/ringbuf.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ringbuf.h b/src/ringbuf.h
index 1465e8fa2..d4baffdbd 100644
--- a/src/ringbuf.h
+++ b/src/ringbuf.h
@@ -173,6 +173,24 @@ size_t ringbuf_read_space(const struct ringbuf * rb);
void ringbuf_reset(struct ringbuf * rb);
/**
+ * Reset the write pointer to the read pointer, making an empty buffer.
+ *
+ * This should only be called by the writer
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ */
+void ringbuf_writer_reset(struct ringbuf * rb);
+
+/**
+ * Reset the read pointer to the write pointer, making an empty buffer.
+ *
+ * This should only be called by the reader
+ *
+ * @param rb a pointer to the ringbuffer structure.
+ */
+void ringbuf_reader_reset(struct ringbuf * rb);
+
+/**
* Write data into the ringbuffer.
*
* @param rb a pointer to the ringbuffer structure.