From 6c5fe457691c2f8166dcf6c9fab0dae3dcb14773 Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 25 Jan 2012 19:03:54 +0000 Subject: [PATCH] Changed buffer from volatile pointers to non-volatile data, to pointers to volatile variables. --- bacnet-stack/include/ringbuf.h | 4 ++-- bacnet-stack/src/ringbuf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bacnet-stack/include/ringbuf.h b/bacnet-stack/include/ringbuf.h index 39de6aef..4e09abdb 100644 --- a/bacnet-stack/include/ringbuf.h +++ b/bacnet-stack/include/ringbuf.h @@ -43,7 +43,7 @@ #include struct ring_buffer_t { - uint8_t * volatile buffer; /* block of memory or array of data */ + volatile uint8_t * buffer; /* block of memory or array of data */ unsigned element_size; /* how many bytes for each chunk */ unsigned element_count; /* number of chunks of data */ volatile unsigned head; /* where the writes go */ @@ -73,7 +73,7 @@ extern "C" { /* Note: element_count must be a power of two */ void Ringbuf_Init( RING_BUFFER * b, /* ring buffer structure */ - uint8_t * volatile buffer, /* data block or array of data */ + volatile uint8_t * buffer, /* data block or array of data */ unsigned element_size, /* size of one element in the data block */ unsigned element_count); /* number of elements in the data block */ diff --git a/bacnet-stack/src/ringbuf.c b/bacnet-stack/src/ringbuf.c index 66c5f89e..d7ddcc53 100644 --- a/bacnet-stack/src/ringbuf.c +++ b/bacnet-stack/src/ringbuf.c @@ -186,7 +186,7 @@ uint8_t *Ringbuf_Alloc( *****************************************************************************/ void Ringbuf_Init( RING_BUFFER * b, /* ring buffer structure */ - uint8_t * volatile buffer, /* data block or array of data */ + volatile uint8_t * buffer, /* data block or array of data */ unsigned element_size, /* size of one element in the data block */ unsigned element_count) { /* number of elements in the data block */