All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Fillod Stephane <stephane.fillod@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [PATCH] uClibc compile failure
Date: Tue, 20 Jan 2009 16:50:50 +0100	[thread overview]
Message-ID: <4975F2DA.30701@domain.hid> (raw)
In-Reply-To: <0B45E93C5FF65740AEAE690BF3848B7AD384F9@domain.hid>

Fillod Stephane wrote:
> Hi,
> 
> I haven't seen a reply to this patch, maybe it has been missed?
>

Actually, it was on queue but delayed by the inlined patch.
The shm_open/unlink should be fixed by now in both the v2.4.x and trunk
branches, I stumbled over them as well while hacking on Blackfin a few weeks
ago; please confirm.

My concern with the inlined patch is basically that it looks like papering over
the problem, but the task will not run in the SCHED_FIFO class anyway, because
it will fail again in the trampoline. However, we do need that task to run in
the SCHED_FIFO class for a number of internal reasons. Could you confirm that
behavior on your target?

TIA,

> 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
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core


-- 
Philippe.


  reply	other threads:[~2009-01-20 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20 14:33 [Xenomai-core] [PATCH] uClibc compile failure Fillod Stephane
2009-01-20 15:50 ` Philippe Gerum [this message]
2009-01-20 16:08   ` Gilles Chanteperdrix
2009-01-20 17:47     ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2008-12-08 16:26 Fillod Stephane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4975F2DA.30701@domain.hid \
    --to=rpm@xenomai.org \
    --cc=stephane.fillod@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.