examples: every socket thread needs a msg queue

This commit is contained in:
Oleg Hahm 2015-11-27 18:04:42 +01:00
parent 860321c3e9
commit fdf6da07eb
1 changed files with 6 additions and 1 deletions

View File

@ -20,9 +20,11 @@
#include <stdio.h>
#include "msg.h"
#include "shell.h"
#define MAIN_MSG_QUEUE_SIZE (1)
#define MAIN_MSG_QUEUE_SIZE (4)
static msg_t main_msg_queue[MAIN_MSG_QUEUE_SIZE];
extern int udp_cmd(int argc, char **argv);
@ -33,6 +35,9 @@ static const shell_command_t shell_commands[] = {
int main(void)
{
/* a sendto() call performs an implicit bind(), hence, a message queue is
* required for the thread executing the shell */
msg_init_queue(main_msg_queue, MAIN_MSG_QUEUE_SIZE);
puts("RIOT socket example application");
/* start shell */
puts("All up, running the shell now");