aboutsummaryrefslogtreecommitdiffstats
path: root/demos/Win32-MinGW/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-23 18:59:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-23 18:59:39 +0000
commit6f6e1a6401eda000dce198150937c7919b4c9855 (patch)
treeb85e95a84dc9618c4abdf9150fdb9ea6070afe4f /demos/Win32-MinGW/main.c
parentb3b1028036a2f18327fb97f2126192a2ace62bb2 (diff)
downloadChibiOS-6f6e1a6401eda000dce198150937c7919b4c9855.tar.gz
ChibiOS-6f6e1a6401eda000dce198150937c7919b4c9855.tar.bz2
ChibiOS-6f6e1a6401eda000dce198150937c7919b4c9855.zip
Improved messages subsystem.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2759 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/Win32-MinGW/main.c')
-rw-r--r--demos/Win32-MinGW/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c
index d2effad35..0830ab149 100644
--- a/demos/Win32-MinGW/main.c
+++ b/demos/Win32-MinGW/main.c
@@ -122,15 +122,16 @@ static const ShellConfig shell_cfg2 = {
/*
* Console print server done using synchronous messages. This makes the access
* to the C printf() thread safe and the print operation atomic among threads.
- * In this example the message is the zero termitated string itself.
+ * In this example the message is the zero terminated string itself.
*/
static msg_t console_thread(void *arg) {
(void)arg;
while (!chThdShouldTerminate()) {
- puts((char *)chMsgWait());
+ Thread *tp = chMsgWait();
+ puts((char *)chMsgGet(tp));
fflush(stdout);
- chMsgRelease(RDY_OK);
+ chMsgRelease(tp, RDY_OK);
}
return 0;
}