Fillod Stephane wrote:
> You may also need this patch:
> 
> --- skins/native/task.c 20 Mar 2007 08:16:41 -0000      1.1.1.1
> +++ skins/native/task.c 28 Mar 2007 13:53:03 -0000      1.2
> @@ -135,7 +135,12 @@
>         pthread_attr_setstacksize(&thattr, stksize);
>         if (!(mode & T_JOINABLE))
>                 pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_DETACHED);
> -       if (prio > 0) {
> +       /* There's a limitation in libpthread
> +        * that returns EPERM upon SCHED_FIFO
> +        * for non priviledged users.
> +        * So workaround this for now. FIXME (in uClibc/pthread).
> +        */
> +       if (prio > 0 && geteuid() == 0) {
>                 pthread_attr_setschedpolicy(&thattr, SCHED_FIFO);
>                 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
>         }

I do not think it is a good idea, I prefer rt_task_create to fail loudly
because it needs root priviledge, rather than silently creating a non
real-time thread.

-- 
                                                 Gilles Chanteperdrix

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to