Hi Janna,

On 05/14/2018 12:29 PM, Janna Om wrote:
> i‘m trying to emulate parallel thread execution to send and receive  messages 
> simultaneously in my application.

which board are you using?

> I have two threads. The main thread with priority 7. It creates and sends 
> messages in while loop with gnrc_netapi_send() function.
> The second receiver thread has priority 6 and receives messages in while loop 
> with function  msg_receive().
> When the application running, there is no context switch. There are only 
> messages sent from the first thread,
> or only messages received from the second thread, depending on what starts 
> first.
> Currently I solved the problem by calling xtimer_sleep() function after after 
>  gnrc_netapi_send().
> Is there a better solution to achieve the parallel execution emulation?

Hard to debug without seeing the code. Would you be able to share the
relevant parts?

Kaspar
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to