All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Anders Blomdell <anders.blomdell@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Weird rt_dev_socket behaviour
Date: Fri, 20 Jun 2008 12:54:43 +0200	[thread overview]
Message-ID: <485B8C73.4060102@domain.hid> (raw)
In-Reply-To: <485AB64D.4020009@domain.hid>

Anders Blomdell wrote:
> With xenomai-2.4.2 and rtnet-0.9.10, is it expected that the following code:
> 
>   ...
>   mlockall(MCL_CURRENT|MCL_FUTURE);
>   rt_task_shadow(&task_self, NULL, 1, T_FPU);
>   fd = rt_dev_socket(AF_PACKET, SOCK_DGRAM, 0);
>   if (fd < 0) {
>     fprintf(stderr, "failed to create socket %d\n", fd);
>     exit(1);
>   }
>   ...
> 
> fails with the message "failed to create socket -12", while the following works
> as expected:
> 
>   ...
>   mlockall(MCL_CURRENT|MCL_FUTURE);
>   rt_task_shadow(&task_self, NULL, 1, T_FPU);
>   rt_task_set_mode(T_PRIMARY, 0, 0);
>   fd = rt_dev_socket(AF_PACKET, SOCK_DGRAM, 0);
>   if (fd < 0) {
>     fprintf(stderr, "failed to create socket %d\n", fd);
>     exit(1);
>   }
>   ...

Yes, this is an RTnet artifact. Check rtnet/Documentation/README.pools
on details how to prepare rt-socket creation from primary domains - but
generally you don't want this, and RTnet will sooner or later remove the
related support (and source of confusion).

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


  reply	other threads:[~2008-06-20 10:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13  9:18 [Xenomai-help] gdb + multi-threaded application + Intel dual core processor + Xenomai => frozen system Kaeppeler, Oliver
2008-05-13  9:36 ` Jan Kiszka
2008-05-13 10:46   ` [Xenomai-help] Interrupt management under rtdm driver DOURNES Guillaume
2008-05-13 11:03     ` Jan Kiszka
2008-05-13 13:11       ` DOURNES Guillaume
2008-05-13 14:47         ` Jan Kiszka
2008-05-13 16:36           ` DOURNES Guillaume
2008-05-13 16:58             ` Jan Kiszka
2008-05-14  9:55               ` DOURNES Guillaume
2008-05-14 19:21                 ` Jan Kiszka
2008-05-14 19:35                   ` Jan Kiszka
2008-05-15 10:24                     ` DOURNES Guillaume
2008-05-16  7:11                       ` Jan Kiszka
2008-05-16 10:08                         ` DOURNES Guillaume
2008-05-16 11:28                           ` [Xenomai-help] Serial driver and TX events Anders Blomdell
2008-05-16 12:49                             ` Jan Kiszka
2008-05-16 13:12                               ` Anders Blomdell
2008-05-16 13:25                                 ` Jan Kiszka
2008-05-16 17:56                                   ` Anders Blomdell
2008-06-19 19:41                                     ` [Xenomai-help] Weird rt_dev_socket behaviour Anders Blomdell
2008-06-20 10:54                                       ` Jan Kiszka [this message]
2008-05-13 14:06   ` [Xenomai-help] gdb + multi-threaded application + Intel dual core processor + Xenomai => frozen system Kaeppeler, Oliver
2008-05-13 14:44     ` Jan Kiszka
2008-05-14  6:13       ` Jan Kiszka
2008-05-14 12:02         ` Kaeppeler, Oliver

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=485B8C73.4060102@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=anders.blomdell@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.