aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-01-07 10:12:42 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-01-07 10:12:42 +0000
commit0c827780f0dcfe27259e64787afa3fb69e92a42f (patch)
tree3b7a85909379e04d090d02c911f3976dba7a04cd /os/rt/include
parent5fc0cb9764bd379d91ca83cd54358c7da2162d55 (diff)
downloadChibiOS-0c827780f0dcfe27259e64787afa3fb69e92a42f.tar.gz
ChibiOS-0c827780f0dcfe27259e64787afa3fb69e92a42f.tar.bz2
ChibiOS-0c827780f0dcfe27259e64787afa3fb69e92a42f.zip
Improved messages.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8707 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r--os/rt/include/ch.h4
-rw-r--r--os/rt/include/chmsg.h4
-rw-r--r--os/rt/include/chschd.h10
3 files changed, 11 insertions, 7 deletions
diff --git a/os/rt/include/ch.h b/os/rt/include/ch.h
index 9794b6dcb..eb35eb944 100644
--- a/os/rt/include/ch.h
+++ b/os/rt/include/ch.h
@@ -48,7 +48,7 @@
/**
* @brief Kernel version string.
*/
-#define CH_KERNEL_VERSION "3.1.0"
+#define CH_KERNEL_VERSION "3.2.0"
/**
* @brief Kernel version major number.
@@ -58,7 +58,7 @@
/**
* @brief Kernel version minor number.
*/
-#define CH_KERNEL_MINOR 1
+#define CH_KERNEL_MINOR 2
/**
* @brief Kernel version patch number.
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;
}
/**
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index 5d9829d57..5c81fdf2d 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -276,6 +276,12 @@ struct ch_thread {
* state.
*/
thread_reference_t *wttrp;
+#if (CH_CFG_USE_MESSAGES == TRUE) || defined(__DOXYGEN__)
+ /**
+ * @brief Thread sent message.
+ */
+ msg_t sentmsg;
+#endif
#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
/**
* @brief Pointer to a generic semaphore object.
@@ -314,10 +320,6 @@ struct ch_thread {
* @brief Messages queue.
*/
threads_queue_t p_msgqueue;
- /**
- * @brief Thread message.
- */
- msg_t p_msg;
#endif
#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
/**