1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 07:21:18 +01:00

Merge pull request #3270 from benoit-canet/3269-fix-msg_init_queue-calls

3269 fix msg init queue calls
This commit is contained in:
Hauke Petersen 2015-06-29 11:17:39 +02:00
commit 340ca1a014
4 changed files with 10 additions and 6 deletions

View File

@ -140,7 +140,7 @@ static void *l2_pkt_handler(void *unused)
radio_packet_t *p;
l2_ping_payload_t *pp;
msg_init_queue(msg_q, sizeof(msg_q));
msg_init_queue(msg_q, RCV_BUFFER_SIZE);
while (1) {
msg_receive(&m);

View File

@ -242,7 +242,7 @@ static void *_aodv_sender_thread(void *arg)
(void) arg;
msg_t msgq[RCV_MSG_Q_SIZE];
msg_init_queue(msgq, sizeof msgq);
msg_init_queue(msgq, RCV_MSG_Q_SIZE);
AODV_DEBUG("_aodv_sender_thread initialized.\n");
while (true) {

View File

@ -26,6 +26,8 @@
#include "thread.h"
#include "msg.h"
#define MSG_QUEUE_SIZE 1
char timer_stack[THREAD_STACKSIZE_MAIN];
char timer_stack_local[THREAD_STACKSIZE_MAIN];
@ -49,8 +51,8 @@ void *timer_thread(void *arg)
/* we need a queue if the second message arrives while the first is still processed */
/* without a queue, the message would get lost */
/* because of the way this timer works, there can be max 1 queued message */
msg_t msgq[1];
msg_init_queue(msgq, sizeof(msgq));
msg_t msgq[MSG_QUEUE_SIZE];
msg_init_queue(msgq, MSG_QUEUE_SIZE);
while (1) {
msg_t m;

View File

@ -31,6 +31,8 @@
#define MAXCOUNT 100
#define MAXDIFF 10000
#define MSG_QUEUE_SIZE 16
char timer_stack[THREAD_STACKSIZE_MAIN*4];
struct timer_msg {
@ -56,8 +58,8 @@ void *timer_thread(void *arg)
(void) arg;
printf("This is thread %" PRIkernel_pid "\n", thread_getpid());
msg_t msgq[16];
msg_init_queue(msgq, sizeof(msgq));
msg_t msgq[MSG_QUEUE_SIZE];
msg_init_queue(msgq, MSG_QUEUE_SIZE);
while (1) {
msg_t m;