diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/Win32-MinGW/main.c | 7 |
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;
}
|