X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fiterator.h;h=2c945b8200e08a555e906dbb888741fa345ff3b7;hb=63629d862e5c6010d362dc30f2e8721221ef0dd5;hp=6c59360c275de480e96c3637a72ac2613c96080b;hpb=721caea47b6506f7ad9086c3e9801dc9dfe06b6a;p=deliverable%2Flttng-modules.git diff --git a/lib/ringbuffer/iterator.h b/lib/ringbuffer/iterator.h index 6c59360c..2c945b82 100644 --- a/lib/ringbuffer/iterator.h +++ b/lib/ringbuffer/iterator.h @@ -23,6 +23,15 @@ extern ssize_t lib_ring_buffer_get_next_record(struct channel *chan, struct lib_ring_buffer *buf); +/* + * Ensure that the current subbuffer is put after client code has read the + * payload of the current record. Has an effect when the end of subbuffer is + * reached. It is not required if get_next_record is called successively. + * However, it should be invoked before returning data to user-space to ensure + * that the get/put subbuffer state is quiescent. + */ +extern void lib_ring_buffer_put_current_record(struct lib_ring_buffer *buf); + /* * channel_get_next_record advances the buffer read position to the next record. * It returns either the size of the next record, -EAGAIN if there is currently