From 80c2a63229dadaf172ae1935e0ab24d402ea5f97 Mon Sep 17 00:00:00 2001 From: bernie Date: Tue, 16 Nov 2004 21:55:12 +0000 Subject: [PATCH] Workaround for a known fifobuf bug. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@279 38d2e660-2303-0410-9eaa-f027e97ec537 --- mware/fifobuf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mware/fifobuf.h b/mware/fifobuf.h index 3bc2b5d0..d63b08cf 100755 --- a/mware/fifobuf.h +++ b/mware/fifobuf.h @@ -43,6 +43,9 @@ /*#* *#* $Log$ + *#* Revision 1.18 2004/11/16 21:55:12 bernie + *#* Workaround for a known fifobuf bug. + *#* *#* Revision 1.17 2004/09/14 20:57:00 bernie *#* Use debug.h instead of kdebug.h. *#* @@ -303,6 +306,9 @@ INLINE bool fifo_isfull_locked(const FIFOBuffer *_fb) */ INLINE void fifo_init(FIFOBuffer *fb, unsigned char *buf, size_t size) { + /* FIFO buffers have a known bug with 1-byte buffers. */ + ASSERT(size > 1); + fb->head = fb->tail = fb->begin = buf; fb->end = buf + size - 1; } -- 2.25.1