From a7ad3ace523d19be103e03f6244e0e797354fe0f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 12 Nov 2007 15:02:23 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@87 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chmsg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/chmsg.c') diff --git a/src/chmsg.c b/src/chmsg.c index 010da86e5..5ea3f9821 100644 --- a/src/chmsg.c +++ b/src/chmsg.c @@ -80,10 +80,12 @@ t_msg chMsgSendWithEvent(Thread *tp, t_msg msg, EventSource *esp) { #endif #ifdef CH_USE_MESSAGES_TIMEOUT -static void unsend(void *p) { +static void wakeup(void *p) { -// Test removed, it should never happen. -// if (((Thread *)p)->p_state == PRSNDMSG) +#ifdef CH_USE_DEBUG + if (((Thread *)p)->p_state != PRSNDMSG) + chDbgPanic("chmsg.c, wakeup()\r\n"); +#endif chSchReadyI(dequeue(p))->p_rdymsg = RDY_TIMEOUT; } @@ -108,7 +110,7 @@ t_msg chMsgSendTimeout(Thread *tp, t_msg msg, t_time time) { chSysLock(); - chVTSetI(&vt, time, unsend, currp); + chVTSetI(&vt, time, wakeup, currp); fifo_insert(currp, &tp->p_msgqueue); if (tp->p_state == PRWTMSG) chSchReadyI(tp); -- cgit v1.2.3