diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-17 09:01:09 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-17 09:01:09 +0000 |
commit | 47326e33d39ac1086cd0c62a10b0a30428033335 (patch) | |
tree | 9a6cf5ec2e52e87375c2de91b75c334026f8572c /os/kernel | |
parent | a1427e9a2201f3b87eace5b11ad64992197dfdf1 (diff) | |
download | ChibiOS-47326e33d39ac1086cd0c62a10b0a30428033335.tar.gz ChibiOS-47326e33d39ac1086cd0c62a10b0a30428033335.tar.bz2 ChibiOS-47326e33d39ac1086cd0c62a10b0a30428033335.zip |
Fixed bug 3219197.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2822 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/include/chqueues.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/kernel/include/chqueues.h b/os/kernel/include/chqueues.h index 1913e8bdd..8a00f404d 100644 --- a/os/kernel/include/chqueues.h +++ b/os/kernel/include/chqueues.h @@ -134,7 +134,8 @@ typedef GenericQueue InputQueue; *
* @iclass
*/
-#define chIQIsFullI(iqp) ((bool_t)(chQSpaceI(iqp) >= chQSizeI(iqp)))
+#define chIQIsFullI(iqp) ((bool_t)(((iqp)->q_wrptr == (iqp)->q_rdptr) && \
+ !chIQIsEmptyI(iqp)))
/**
* @brief Input queue read.
@@ -205,7 +206,8 @@ typedef GenericQueue OutputQueue; *
* @iclass
*/
-#define chOQIsEmptyI(oqp) ((bool_t)(chQSpaceI(oqp) >= chQSizeI(oqp)))
+#define chOQIsEmptyI(oqp) ((bool_t)(((oqp)->q_wrptr == (oqp)->q_rdptr) && \
+ !chOQIsFullI(oqp)))
/**
* @brief Evaluates to @p TRUE if the specified output queue is full.
|