summaryrefslogtreecommitdiffstats
path: root/lf_ring_buffer2.h
diff options
context:
space:
mode:
Diffstat (limited to 'lf_ring_buffer2.h')
-rw-r--r--lf_ring_buffer2.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lf_ring_buffer2.h b/lf_ring_buffer2.h
index 6f0cee1..acf9974 100644
--- a/lf_ring_buffer2.h
+++ b/lf_ring_buffer2.h
@@ -38,13 +38,14 @@ extern "C" {
#define LFRB_NO_BLOCK 1 /* if buffer is full, leave instead of try again and again */
#define IS_NOT_BLOCKING( flags ) ( (flags)&LFRB_NO_BLOCK )
+/* the ring buffer structure */
typedef struct ring_buffer {
LFRB_BUFFER_TYPE *buffer; /* buffer data */
- size_t n_buf; /* number of buffers */
- unsigned int indexes; /* indexes where to read from and write data to */
+ size_t n_buf; /* number of buffers, max 65534, see implementation for details */
+ unsigned int indexes; /* indexes where to read_from and write_to */
} lf_ring_buffer_t;
-/* return an initialized lf_ring_buffer_t struct */
+/* return an initialized lf_ring_buffer_t struct, size is limited to 65534, see implementation for details */
lf_ring_buffer_t* lf_ring_buffer_create( size_t n_buf );
/* destroy an lf_ring_buffer_t struct */