Gilles Chanteperdrix wrote:
> Wolfgang Grandegger wrote:
>  > After adding pthread_getschedparam() I realized, that policy was 1 and
>  > prio 10 and not as expected 5. The corresponding attribute settings
>  > before calling pthread_create have been ignored somehow. Am I doing
>  > something wrong in task_init()?
> 
> Wait, what you observe here is that the low prio task inherits
> scheduling parameter from the high prio task. The default value for the
> inheritsched attribute is PTHREAD_INHERIT_SCHED. So, if you want to set
> explicitely the scheduling parameter, you should call
> pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);

You are right. With PTHREAD_EXPLICIT_SCHED it works as expected with
2.6. With 2.4, it seems to be the default. I'm not really an advanced
POSIX/PTHREAD programmer :-(.

Wolfgang,

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to