I am a new beginner to learn RIOT. I got some question when I run the “thread_msg” on board “SAMR21-xpro”.
For the thread1, thread2 and thread3, they have the same priority. so when the thread3 is running, how can scheduler switch to the thread1.
I saw these in the API:
“In case of equal priorities, the threads are scheduled in a semi-cooperative fashion. That means that unless an interrupt happens, threads with the same priority will only switch due to voluntary or implicit context switches.”
“Some functions that unblock another thread, e.g.
[mutex_unlock()](http://riot-os.org/api/group__core__sync.html#ga05ccabe849d63b032f6317323da60187), can cause a thread switch, if the target had a higher priority.”
but here, all the three threads have the same priority, so according the rule, even there is
[msg_send()](http://riot-os.org/api/group__core__msg.html#gac5347725c3d203ac72604c0ab8b7d6d8), the thread3 should not be blocked and run forever, but it doesn’t.
Thanks for your time!
Regards, Jianwen OUYANG