From a6feec221cd3050e0f2d56950abd39677790d79f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 9 May 2009 16:05:41 +0000 Subject: Removed the CH_USE_SEMAPHORES_TIMEOUT configuration option. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@962 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chqueues.c | 75 ---------------------------------------------------------- 1 file changed, 75 deletions(-) (limited to 'src/chqueues.c') diff --git a/src/chqueues.c b/src/chqueues.c index de2160e36..a72b83696 100644 --- a/src/chqueues.c +++ b/src/chqueues.c @@ -90,39 +90,6 @@ msg_t chIQPutI(InputQueue *iqp, uint8_t b) { return Q_OK; } -#if !CH_USE_SEMAPHORES_TIMEOUT || defined(__DOXYGEN__) -/** - * @brief Input queue read. - * @details This function reads a byte value from an input queue. If the queue - * is empty then the calling thread is suspended until a byte arrives - * in the queue. - * - * @param[in] iqp pointer to an @p InputQueue structure - * @return A byte value from the queue or: - * @retval Q_RESET if the queue was reset. - */ -msg_t chIQGet(InputQueue *iqp) { - uint8_t b; - msg_t msg; - - chSysLock(); - if ((msg = chSemWaitS(&iqp->q_sem)) < RDY_OK) { - chSysUnlock(); - return msg; - } - b = *iqp->q_rdptr++; - if (iqp->q_rdptr >= iqp->q_top) - iqp->q_rdptr = iqp->q_buffer; - - if (iqp->q_notify) - iqp->q_notify(); - - chSysUnlock(); - return b; -} -#endif /* !CH_USE_SEMAPHORES_TIMEOUT */ - -#if CH_USE_SEMAPHORES_TIMEOUT || defined(__DOXYGEN__) /** * @brief Input queue read with timeout. * @details This function reads a byte value from an input queue. If the queue @@ -138,9 +105,6 @@ msg_t chIQGet(InputQueue *iqp) { * @return A byte value from the queue or: * @retval Q_TIMEOUT if the specified time expired. * @retval Q_RESET if the queue was reset. - * - * @note The function is only available when the @p CH_USE_SEMAPHORES_TIMEOUT - * kernel option is activated, */ msg_t chIQGetTimeout(InputQueue *iqp, systime_t timeout) { uint8_t b; @@ -161,7 +125,6 @@ msg_t chIQGetTimeout(InputQueue *iqp, systime_t timeout) { chSysUnlock(); return b; } -#endif /* CH_USE_SEMAPHORES_TIMEOUT */ /** * @brief Non-blocking read. @@ -241,40 +204,6 @@ void chOQResetI(OutputQueue *oqp) { chSemResetI(&oqp->q_sem, (cnt_t)(oqp->q_top - oqp->q_buffer)); } -#if !CH_USE_SEMAPHORES_TIMEOUT || defined(__DOXYGEN__) -/** - * @brief Output queue write. - * @details This function writes a byte value to an output queue. If the queue - * is full then the calling thread is suspended until there is space - * in the queue. - * - * @param[in] oqp pointer to an @p OutputQueue structure - * @param[in] b the byte value to be written in the queue - * @return The operation status: - * @retval Q_OK if the operation succeeded. - * @retval Q_RESET if the queue was reset. - */ -msg_t chOQPut(OutputQueue *oqp, uint8_t b) { - msg_t msg; - - chSysLock(); - if ((msg = chSemWaitS(&oqp->q_sem)) < RDY_OK) { - chSysUnlock(); - return msg; - } - *oqp->q_wrptr++ = b; - if (oqp->q_wrptr >= oqp->q_top) - oqp->q_wrptr = oqp->q_buffer; - - if (oqp->q_notify) - oqp->q_notify(); - - chSysUnlock(); - return Q_OK; -} -#endif /* !CH_USE_SEMAPHORES_TIMEOUT */ - -#if CH_USE_SEMAPHORES_TIMEOUT || defined(__DOXYGEN__) /** * @brief Output queue write with timeout. * @details This function writes a byte value to an output queue. If the queue @@ -292,9 +221,6 @@ msg_t chOQPut(OutputQueue *oqp, uint8_t b) { * @retval Q_OK if the operation succeeded. * @retval Q_TIMEOUT if the specified time expired. * @retval Q_RESET if the queue was reset. - * - * @note The function is only available when the @p CH_USE_SEMAPHORES_TIMEOUT - * kernel option is activated, */ msg_t chOQPutTimeout(OutputQueue *oqp, uint8_t b, systime_t timeout) { msg_t msg; @@ -314,7 +240,6 @@ msg_t chOQPutTimeout(OutputQueue *oqp, uint8_t b, systime_t timeout) { chSysUnlock(); return Q_OK; } -#endif /* CH_USE_SEMAPHORES_TIMEOUT */ /** * @brief Output queue read. -- cgit v1.2.3