Hi,

I haven't seen a reply to this patch, maybe it has been missed?

https://mail.gna.org/public/xenomai-core/2008-12/msg00009.html


---8<-------8<-------8<-------8<-------8<-------8<----

I have bumped on a compilation failure of Xenomai 2.4.6 with uClibc.
The mmap64/ftruncate64 functions may not be available, at all.
So here's an attached patch (xeno-uclibc-link.patch) against 2.4.6,
FWIW.

BTW, people stuck with a fascist pthread that lets only superuser use 
SCHED_FIFO will also need the following patch. Same discussion[1]
applies.
[1] https://mail.gna.org/public/xenomai-help/2007-05/msg00330.html

--- src/skins/native/task.c     9 Jun 2008 09:38:14 -0000       1.5
+++ src/skins/native/task.c     8 Dec 2008 10:37:55 -0000
@@ -139,7 +139,13 @@

        pthread_attr_setinheritsched(&thattr, PTHREAD_EXPLICIT_SCHED);
        memset(&param, 0, sizeof(param));
-       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 = prio;
        } else

-- 
Stephane

Attachment: xeno-uclibc-link.patch
Description: xeno-uclibc-link.patch

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

Reply via email to