Hi Philippe,
> Excepts from your code:
> while(!end){
> //switch to primary mode
> ret = rt_task_set_mode(0, T_PRIMARY, NULL);
>
> Damnit. I knew this particular interface was going to be misused most of
> the time. In short: do ____NOT_____ switch modes manually, this is
> useless because Xenomai syscalls do it for you, and even sub-optimal
> because the kernel knows better when it needs it and saves you a syscall
> when required. The T_PRIMARY bit has been solely provided for internal
> Xenomai purposes (some Xenomai libs have very special requirements in
> very rare cases). rt_task_wait_period() will switch to primary mode if
> needed, and always leave you in primary upon return.
>
Indeed, I was also doing the same thing. From my understanding of the
docs, I assumed that manually setting a task to secondary mode was
allowed and could improve performance. Take for instance a task that
logs data coming from a RT_QUEUE to a file. Is there anything special
that should be done to minimize the impact of the frequent mode switches
in such a case?
Thanks,
Vincent Levesque
[EMAIL PROTECTED]
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help