aboutsummaryrefslogtreecommitdiffstats
path: root/src/chqueues.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-25 09:34:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-25 09:34:25 +0000
commit902470d1c542735b989a727355744a974af43de4 (patch)
tree3b467b808f7323438f8a7625e02da3536dc52d62 /src/chqueues.c
parent8317685beb67ed9341bc83d03153580b816f452e (diff)
downloadChibiOS-902470d1c542735b989a727355744a974af43de4.tar.gz
ChibiOS-902470d1c542735b989a727355744a974af43de4.tar.bz2
ChibiOS-902470d1c542735b989a727355744a974af43de4.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@481 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chqueues.c')
-rw-r--r--src/chqueues.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/chqueues.c b/src/chqueues.c
index ed9eb840c..30e71a055 100644
--- a/src/chqueues.c
+++ b/src/chqueues.c
@@ -108,7 +108,7 @@ msg_t chIQGet(Queue *qp) {
return b;
}
-#ifdef CH_USE_QUEUES_TIMEOUT
+#if defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT)
/**
* Gets a byte from the input queue, if the queue is empty then the
* calling thread is suspended until a byte arrives in the queue or the
@@ -118,8 +118,8 @@ msg_t chIQGet(Queue *qp) {
* @return A byte value from the queue.
* @retval Q_TIMEOUT if the specified time expired.
* @retval Q_RESET if the queue was reset.
- * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT
- * option is enabled in \p chconf.h.
+ * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT and
+ * \p CH_USE_SEMAPHORES_TIMEOUT options are enabled in \p chconf.h.
*/
msg_t chIQGetTimeout(Queue *qp, systime_t time) {
uint8_t b;
@@ -142,7 +142,7 @@ msg_t chIQGetTimeout(Queue *qp, systime_t time) {
chSysUnlock();
return b;
}
-#endif /* CH_USE_QUEUES_TIMEOUTS */
+#endif /* defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) */
/**
* Reads some data from the input queue into the specified buffer. The function
@@ -358,7 +358,7 @@ msg_t chHDQGetReceive(HalfDuplexQueue *qp) {
return b;
}
-#ifdef CH_USE_QUEUES_TIMEOUT
+#if defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT)
/**
* Reads a byte from the receive queue, if the queue is empty or is in
* transmission mode then the invoking thread is suspended.
@@ -366,8 +366,8 @@ msg_t chHDQGetReceive(HalfDuplexQueue *qp) {
* @param time the number of ticks before the operation timouts
* @return The byte value.
* @retval Q_TIMEOUT if a timeout occurs.
- * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT
- * option is enabled in \p chconf.h.
+ * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT and
+ * \p CH_USE_SEMAPHORES_TIMEOUT options are enabled in \p chconf.h.
*/
msg_t chHDQGetReceiveTimeout(HalfDuplexQueue *qp, systime_t time) {
uint8_t b;
@@ -394,7 +394,7 @@ msg_t chHDQGetReceiveTimeout(HalfDuplexQueue *qp, systime_t time) {
chSysUnlock();
return b;
}
-#endif
+#endif /* defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) */
/**
* Writes a byte into the transmit queue. If the buffer contains unread