└───liblfds710 ├───inc │ └───liblfds710 │ lfds710_ringbuffer.h └───src └───lfds710_ringbuffer lfds710_ringbuffer_read.c
int lfds710_ringbuffer_read( struct lfds710_ringbuffer_state *rs, void **key, void **value );
struct lfds710_ringbuffer_state *rs
- A pointer to an initialized struct lfds710_ringbuffer_state.
- Set to the value of the key in the current read element. This argument can be NULL, in which case it is not used (and so the caller cannot know the key).
- Set to the value of the value in the current read element. This argument can be NULL, in which case it is not used (and so the caller cannot know the value).
This function returns 1 on successful read, 0 if the ringbuffer has no unread elements.
Reads the oldest unread element in the ringbuffer. This element, which is to say the key and value in the element, is read by and only by one reader.