All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Petr Cervenka <grugh@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] rt_task_shadow returns always -EFAULT
Date: Fri, 17 Jul 2009 14:05:40 +0200	[thread overview]
Message-ID: <1247832340.4228.132.camel@domain.hid> (raw)
In-Reply-To: <1247829470.829653.30773.nullmailer@domain.hid>

On Fri, 2009-07-17 at 13:17 +0200, Petr Cervenka wrote:
> >On Thu, 2009-07-16 at 15:15 +0200, Petr Cervenka wrote:
> >> Hello,
> >> the xenomai native function rt_task_shadow(...) always returns -EFAULT for me. Only happens in xenomai-2.5-rc2.
> >> 
> >> Same behaviour was also in 2.5-rc1, see note in my older post:
> >> https://mail.gna.org/public/xenomai-help/2009-05/msg00024.html
> >> 
> >> Example code, in the end of this post:
> >> https://mail.gna.org/public/xenomai-help/2009-05/msg00038.html
> >> 
> >> My configuration:
> >> Athlon 64 X2 4600+
> >> Kubuntu 7.10
> >> linux-2.6.29.5 (also tried 2.6.30.1)
> >> xenomai-2.5.-rc2
> >
> >Does this still break when the name is passed as illustrated below?
> >
> 
> No, it doesn't help.
> 
> I also tried the xenomai rtprint example -> same behavior. The rt_task_shadow() returns -EFAULT and any following rt_task_sleep() in that task returns -1. The other task works fine.
> I will do some deeper examination of rt_task_shadow() code.
> If you have any advices, what to send or what to try, i would like to hear it.
> 

Try instrumenting ksrc/skins/native/syscall.c, __rt_task_create(), to
identify which spot returns -EFAULT. I can't reproduce this issue on a
ppc target; I may try over x86 later, but this would speed up things if
you could spot the failing test before I'm able to switch to this.

> >--- petr.c~	2009-07-16 15:50:46.000000000 +0200
> >+++ petr.c	2009-07-16 16:28:31.000000000 +0200
> >@@ -14,11 +14,12 @@
> >     RT_EVENT event;
> >     unsigned long mask;
> >     RTIME start, end;
> >+    char name[32];
> >     int res;
> > 
> >     mlockall(MCL_CURRENT | MCL_FUTURE);
> > 
> >-    res = rt_task_shadow(&mainTask, "main_task", MY_PRIORITY, 0);
> >+    res = rt_task_shadow(&mainTask, strcpy(name, "main_task"), MY_PRIORITY, 0);
> >     if (res < 0) {
> >         printf("rt_task_shadow(): %d (%s)n", res, strerror(-res));
> >     }
> >
> >> 
> >> Best regards
> >> 
> >> Petr Cervenka
> >> 
> >> _______________________________________________
> >> Xenomai-help mailing list
> >> Xenomai-help@domain.hid
> >> https://mail.gna.org/listinfo/xenomai-help
> >-- 
> >Philippe.
> >
> >
> Petr
-- 
Philippe.




  reply	other threads:[~2009-07-17 12:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 13:15 [Xenomai-help] rt_task_shadow returns always -EFAULT Petr Cervenka
2009-07-16 14:30 ` Philippe Gerum
2009-07-17 11:17   ` Petr Cervenka
2009-07-17 12:05     ` Philippe Gerum [this message]
2009-07-17 13:32       ` Petr Cervenka
2009-07-17 13:52         ` Philippe Gerum
2009-07-17 15:51           ` Petr Cervenka
2009-07-18  8:05             ` Jan Kiszka
2009-07-18 10:32               ` Gilles Chanteperdrix
2009-07-18 12:56                 ` Jan Kiszka
2009-07-18 13:01                   ` Gilles Chanteperdrix
2009-07-18 13:31                     ` Jan Kiszka
2009-07-18 13:40                       ` Gilles Chanteperdrix
2009-07-19  8:04                         ` Jan Kiszka

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=1247832340.4228.132.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=grugh@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.