aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-20 19:46:45 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-20 19:46:45 +0000
commit530fc2f44089fc8a96cd68884cdb9c9d9993bd12 (patch)
tree5551369bd20b8673deebe0dbc976e3afb0607fc8 /os/kernel
parent300345460518dcafbd955e7d3975dd7cb47999e1 (diff)
downloadChibiOS-530fc2f44089fc8a96cd68884cdb9c9d9993bd12.tar.gz
ChibiOS-530fc2f44089fc8a96cd68884cdb9c9d9993bd12.tar.bz2
ChibiOS-530fc2f44089fc8a96cd68884cdb9c9d9993bd12.zip
Change required by a bug into the Cosmic STM8 compiler. This change is a workaround.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2986 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/include/chqueues.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/kernel/include/chqueues.h b/os/kernel/include/chqueues.h
index d38b25e6f..a2df59dad 100644
--- a/os/kernel/include/chqueues.h
+++ b/os/kernel/include/chqueues.h
@@ -149,7 +149,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) && \
+ ((iqp)->q_counter != 0)))
/**
* @brief Input queue read.
@@ -243,7 +244,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) && \
+ ((oqp)->q_counter != 0)))
/**
* @brief Evaluates to @p TRUE if the specified output queue is full.