All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: "Ignacio García Pérez" <iggarpe@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] xn_pipe_create [minor]
Date: Mon, 14 Nov 2005 17:29:34 +0100	[thread overview]
Message-ID: <4378BB6E.2090703@domain.hid> (raw)
In-Reply-To: <4378BB28.8080804@domain.hid>

Ignacio García Pérez wrote:
> Dmitry Adamushko wrote:
> 
> 
>>xenomai-help-bounces@domain.hid wrote on 14.11.2005 13:15:07:
>>
>>
>>>Hi,
>>>
>>>The registry system is great, allows to forget about agreeing about an
>>>arbitrary minor number for pipes. But as far as I ca see, you still have
>>>to pass an unique "minor" number to rt_pipe_create.
>>>
>>>What if you have several rt modules?... you must make sure you assign
>>>different minor numbers to each pipe!.
>>>
>>>Wouldn't be useful to have a way to let the rt_pipe_create decide which
>>>minor to use? (a free one, of course)
>>
>>It can be done and that would work if both sides of the communication
>>channel are real-time threads so a rt_pipe_create/bind() pair may be
>>used to establish a connection.
>>
>>But what should be done if another side is a linux task and uses a
>>mere open() call?
>>
>>Currently, a naming convention is a "/dev/rtpN", N - is a minor being
>>used by rt_pipe_create() and both sides of the channel must be aware
>>of it.
>>
>>Moreover, a client side of the connection may be open even in case
>>there is no server side yet (the one that calls rt_pipe_create) at the
>>mement. In that case, the client is blocked in open().
>>
>>So the only convention between both sides can be a minor number +
>>pre-created /dev/rtp[0, OPT_PIPE_NRDEV] character devices.
>>
> 
> Um... I think you are wrong. When the rt task creates a pipe, a symbolik
> link appears at /proc/xenomai/registry/pipes. Its name is the fifo name,
> and points to the /dev/rtpN device. That's what I was talking about when
> I said "clever procfs usage of xenomai".
> 
> Using this scheme, user mode programs just need to open()
> /proc/xenomai/registry/pipes/whatever to access a named pipe, without
> having to know the minor number.
> 
> Under these circumstances, it would be *very* useful to have
> rt_pipe_create choose an unused minor automagically (for example passing
> -1 as the minor).
>

Sounds reasonable.

> Currently, I'm emulating this by calling rt_pipe_create for minor =
> 0,1,2... until it succeeds or returns any error different than -EBUSY.
> 
> Nacho.
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


-- 

Philippe.


  reply	other threads:[~2005-11-14 16:29 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10 21:05 [Xenomai-help] Creation of a rt-queue from the user space ROSSIER Daniel
2005-11-11  9:30 ` [Xenomai-help] printk Ignacio García Pérez
2005-11-11 11:07   ` Dmitry Adamushko
2005-11-14 10:52     ` Ignacio García Pérez
2005-11-14 11:26       ` Philippe Gerum
2005-11-14 12:03         ` Dmitry Adamushko
2005-11-14 13:22           ` Philippe Gerum
2005-11-14 13:47             ` Philippe Gerum
2005-11-14 14:50               ` [Xenomai-core] " Dmitry Adamushko
2005-11-14 15:56                 ` [Xenomai-core] rt_pipe_* usage Ignacio García Pérez
2005-11-14 16:15                   ` [Xenomai-core] More on rt pipes usage Ignacio García Pérez
2005-11-15 13:24                     ` Philippe Gerum
2005-11-15 16:41                       ` [Xenomai-help] " Ignacio García Pérez
2005-11-14 16:23                   ` [Xenomai-core] rt_pipe_* usage Dmitry Adamushko
2005-11-14 16:36                     ` Ignacio García Pérez
2005-11-15 12:41                       ` [Xenomai-core] Web site error (API doc search) Ignacio García Pérez
2005-11-15 13:16                       ` [Xenomai-core] rt_pipe_* usage Philippe Gerum
2005-11-15 16:22                         ` Ignacio García Pérez
2005-11-16  5:38                           ` Philippe Gerum
2005-11-15  9:38                 ` [Xenomai-core] Re: [Xenomai-help] printk Philippe Gerum
2005-11-15 10:00                   ` Dmitry Adamushko
2005-11-16 12:58                     ` Philippe Gerum
2005-11-16 14:44                       ` Dmitry Adamushko
2005-11-17  9:44                       ` [Xenomai-help] Blocking reads from pipes Ignacio García Pérez
2005-11-17 10:21                         ` Romain Lenglet
2005-11-17 13:16                           ` Ignacio García Pérez
2005-11-17 15:11                             ` Dmitry Adamushko
2005-11-17 17:24                               ` Gilles Chanteperdrix
2005-11-17 17:55                                 ` [Xenomai-core] " Dmitry Adamushko
2005-11-17 19:17                                   ` Gilles Chanteperdrix
2005-11-17 19:45                                     ` Dmitry Adamushko
2005-11-18  8:57                                       ` Ignacio García Pérez
2005-11-18  9:10                                         ` Dmitry Adamushko
2005-11-17 19:40                                 ` Dmitry Adamushko
2005-11-17 10:46                         ` Dmitry Adamushko
2005-11-14 12:15       ` [Xenomai-help] xn_pipe_create [minor] Ignacio García Pérez
2005-11-14 13:53         ` Dmitry Adamushko
2005-11-14 16:28           ` Ignacio García Pérez
2005-11-14 16:29             ` Philippe Gerum [this message]
2005-11-14 16:41               ` Ignacio García Pérez
2005-11-14 16:52                 ` Dmitry Adamushko
2005-11-14 17:38                   ` Philippe Gerum
2005-11-14 18:33                     ` Dmitry Adamushko
2005-11-15  8:04                       ` Philippe Gerum
2005-11-14 18:03                   ` [Xenomai-help] Strange pipe behaviour Ignacio García Pérez
2005-11-16  5:45                     ` Philippe Gerum
2005-11-16  7:45                       ` Ignacio García Pérez
2005-11-16 11:45                         ` Philippe Gerum
2005-11-14 16:40             ` [Xenomai-help] xn_pipe_create [minor] Dmitry Adamushko
2005-11-12 19:45   ` [Xenomai-help] printk Philippe Gerum
2005-11-14 10:47   ` [Xenomai-help] Invalid characters in task's names Ignacio García Pérez
2005-11-14 11:39     ` Philippe Gerum
2005-11-11 14:08 ` [Xenomai-help] Creation of a rt-queue from the user space 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=4378BB6E.2090703@domain.hid \
    --to=rpm@xenomai.org \
    --cc=iggarpe@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.