[Xenomai] Enabling Round-robin scheduling

Mnatsakanyan, M. m.mnatsakanyan at tue.nl
Wed Mar 26 16:55:40 CET 2014


My question is related to enabling round-robin scheduling using Native Xenomai API 2.6.3.
It is a beginner's question, but I hope it is ok to post it here.

The problem is that I am not managing to enable round-robin scheduler.
The only place where I could find something about it is this page:

But it is rather old page and seems many things have changed after that.
Simply set, it advises to enable RR by following two calls:

rt_task_set_mode(0,T_RRB ,NULL);

T_RRB is not defined in 2.6.3 so I tried to replace it with XNRRB and call these two methods inside my task function but it did not work. I used the code example given in the mentioned page.

My first question is whether it is the right method to enable RR?

Given the description of rt_task_set_mode in API documentation I have another question.

As I understand if we want to use RR scheduler, we call rt_task_set_mode from task function in order to specify that the task undergoes a round-robin scheduling. So it is up to task to decide whether it wants to be scheduled by RR or not. Is it a correct assumption?

My question is whether it is possible to have tasks undergoing RR and not undergoing in the same application?

If yes, how all the tasks are scheduled?

Your elaboration on these questions would be a great help.

Thank you!

More information about the Xenomai mailing list