From 80b8ee53cbf9e69f6831124f469358aa7d4e97d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 5 Jan 2010 23:30:16 +0100 Subject: add missing read_delay init in lf_ring_buffer --- lf_ring_buffer.c | 3 ++- lf_ring_buffer.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lf_ring_buffer.c b/lf_ring_buffer.c index 7796206..225ef4d 100644 --- a/lf_ring_buffer.c +++ b/lf_ring_buffer.c @@ -1,5 +1,5 @@ /* - * File : lf_ring_buffer.h + * File : lf_ring_buffer.c * Author : Jérémy Zurcher * Date : 05/01/010 * License : @@ -47,6 +47,7 @@ lf_ring_buffer_t* lf_ring_buffer_create( int n_buf ) { r->read_from = -1; r->write_to = 0; r->write_delay=BACKOFF_DELAY_INIT; + r->read_delay=BACKOFF_DELAY_INIT; return r; } diff --git a/lf_ring_buffer.h b/lf_ring_buffer.h index 7c237ab..e9a5727 100644 --- a/lf_ring_buffer.h +++ b/lf_ring_buffer.h @@ -60,10 +60,10 @@ typedef struct ring_buffer { #define MARK_AS_FILLED( idx ) { r->buffer[(idx)].status=1; } #define MARK_AS_READ( idx ) { r->buffer[(idx)].status=0; } -/* initialize an empty lf_ring_buffer struct */ +/* return an initialized lf_ring_buffer_t struct */ lf_ring_buffer_t* lf_ring_buffer_create( int n_buf ); -/* destroy an lf_ring_buffer strcture */ +/* destroy an lf_ring_buffer_t struct */ void lf_ring_buffer_destroy( lf_ring_buffer_t *r ); /* write data into the ring buffer -- cgit v1.1-2-g2b99