Skip to content
Snippets Groups Projects
Commit fdf6da07 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

examples: every socket thread needs a msg queue

parent 860321c3
No related branches found
No related tags found
No related merge requests found
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
#include <stdio.h> #include <stdio.h>
#include "msg.h"
#include "shell.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); extern int udp_cmd(int argc, char **argv);
...@@ -33,6 +35,9 @@ static const shell_command_t shell_commands[] = { ...@@ -33,6 +35,9 @@ static const shell_command_t shell_commands[] = {
int main(void) 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"); puts("RIOT socket example application");
/* start shell */ /* start shell */
puts("All up, running the shell now"); puts("All up, running the shell now");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment