From 194d3192fc00d380ffcfcd702358591310f9e56b Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 21 Jul 2020 14:19:52 +0200 Subject: [PATCH] tests/trickle: add message queue Add a message queue in case main thread is not yet waiting for the message when it gets sent. --- tests/trickle/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/trickle/main.c b/tests/trickle/main.c index a57acda21c..0e2fe51c68 100644 --- a/tests/trickle/main.c +++ b/tests/trickle/main.c @@ -31,6 +31,9 @@ #define FIRST_ROUND (5) #define SECOND_ROUND (12) +#define MAIN_QUEUE_SIZE (2) +static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; + static uint32_t old_t = 0; static bool error = false; @@ -63,6 +66,8 @@ int main(void) msg_t msg; unsigned counter = 0; + msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE); + trickle_start(sched_active_pid, &trickle, TRICKLE_MSG, TR_IMIN, TR_IDOUBLINGS, TR_REDCONST);