Hello,

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."
and
"Some functions that unblock another thread, e.g. msg_send() or mutex_unlock(), 
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(), the thread3 should not be blocked and run forever, 
but it doesn't.

Thanks for your time!

Regards,
Jianwen OUYANG


                                          
_______________________________________________
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel

Reply via email to