X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fringbuffer%2Fiterator.h;h=a9879903503dbb44d118bb6de9473c6123676d34;hb=4442bc1bdfdf37f5b1cc3fe6817439d922798323;hp=a006ed00e1bb34b66da9f7552a2f8435605a4702;hpb=092ffe9764a1f127a33dc8eed682f7cd5e81bed1;p=deliverable%2Flttng-modules.git diff --git a/include/ringbuffer/iterator.h b/include/ringbuffer/iterator.h index a006ed00..a9879903 100644 --- a/include/ringbuffer/iterator.h +++ b/include/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