From 0c827780f0dcfe27259e64787afa3fb69e92a42f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 7 Jan 2016 10:12:42 +0000 Subject: Improved messages. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8707 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chmsg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'os/rt/include/chmsg.h') diff --git a/os/rt/include/chmsg.h b/os/rt/include/chmsg.h index 61c117e75..cd4f99897 100644 --- a/os/rt/include/chmsg.h +++ b/os/rt/include/chmsg.h @@ -95,7 +95,9 @@ static inline bool chMsgIsPendingI(thread_t *tp) { */ static inline msg_t chMsgGet(thread_t *tp) { - return tp->p_msg; + chDbgAssert(tp->p_state == CH_STATE_SNDMSG, "invalid state"); + + return tp->p_u.sentmsg; } /** -- cgit v1.2.3