aboutsummaryrefslogtreecommitdiffstats
path: root/src/chmsg.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-23 14:50:42 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-23 14:50:42 +0000
commit68003a03c299850f0b66adfa4df6c9d6b6ba6ab2 (patch)
tree719bb767775d1cddb05f070b32b67abfa51a37e9 /src/chmsg.c
parent1aecb14913213565c804dda42322c6fb3136827d (diff)
downloadChibiOS-68003a03c299850f0b66adfa4df6c9d6b6ba6ab2.tar.gz
ChibiOS-68003a03c299850f0b66adfa4df6c9d6b6ba6ab2.tar.bz2
ChibiOS-68003a03c299850f0b66adfa4df6c9d6b6ba6ab2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@182 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chmsg.c')
-rw-r--r--src/chmsg.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/chmsg.c b/src/chmsg.c
index ef8b111dc..91a6cc9fd 100644
--- a/src/chmsg.c
+++ b/src/chmsg.c
@@ -94,57 +94,6 @@ t_msg chMsgSendWithEvent(Thread *tp, t_msg msg, EventSource *esp) {
}
#endif
-#ifdef CH_USE_MESSAGES_TIMEOUT
-static void wakeup(void *p) {
-
- chDbgAssert(((Thread *)p)->p_state == PRSNDMSG, "chmsg.c, wakeup()");
- chSchReadyI(dequeue(p), RDY_TIMEOUT);
-}
-
-/**
- * Sends a message to the specified thread with timeout specification. The
- * sender is stopped until the receiver executes a \p chMsgRelease().
- *
- * @param tp the pointer to the thread
- * @param msg the message. Note that it can be a pointer to a complex
- * message structure.
- * @param time the number of ticks before the operation fails
- * @return the message return status from \p chMsgRelease() or
- * \p RDY_TIMEOUT the specified time expired.
- * @note The server thread can also return data into the message structure
- * if you need messages to be bidirectional, just define the structure
- * according your needs. If you dont need complicated messages exchange
- * you may just use the \p chMsgRelease() status code as response
- * to the message.
- */
-t_msg chMsgSendTimeout(Thread *tp, t_msg msg, t_time time) {
- VirtualTimer vt;
-
- chSysLock();
-
- chVTSetI(&vt, time, wakeup, currp);
-#ifdef CH_USE_MESSAGES_PRIORITY
- if (tp->p_flags & P_MSGBYPRIO)
- prio_insert(currp, &tp->p_msgqueue);
- else
- fifo_insert(currp, &tp->p_msgqueue);
-#else
- fifo_insert(currp, &tp->p_msgqueue);
-#endif
- currp->p_msg = msg;
- currp->p_wtthdp = tp;
- if (tp->p_state == PRWTMSG)
- chSchReadyI(tp, RDY_OK);
- chSchGoSleepS(PRSNDMSG);
- msg = currp->p_rdymsg;
- if (chVTIsArmedI(&vt))
- chVTResetI(&vt);
-
- chSysUnlock();
- return msg;
-}
-#endif /* CH_USE_MESSAGES_TIMEOUT */
-
/**
* Suspends the thread and waits for an incoming message.
*