[riot-users] Parallel threads

Janna Om Janna_OM at hotmail.com
Mon May 14 12:29:30 CEST 2018

i‘m trying to emulate parallel thread execution to send and receive  messages simultaneously in my application.
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?
Would be glad about any advice.
Thank You in advance!
Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20180514/032c110e/attachment.html>

More information about the users mailing list