From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [patch 2/4] RTDM support for select-like service.
Date: Mon, 11 Feb 2008 22:24:33 +0100 [thread overview]
Message-ID: <18352.48401.264561.143362@domain.hid> (raw)
In-Reply-To: <47AF7F3C.6080805@domain.hid>
Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
> > Would not it be simpler to put a pointer to the task_struct ? After all,
> > it already has a pid, comm and mm, and a file descriptor will not
> > survive a task_struct thanks to automatic closing of file descriptors.
>
> Hmm, hmm, hmmmm... Sounds reasonable, should be safe.
Actually no, we can not do that because a task_struct may well disappear
and the rtdm_process continue to exist as long as another thread uses the
same mm.
>
> >
> > Could you
> > > live without the check until we have per-process fd tabled, or was it
> > > essential for the select thing?
> >
> > An application which I ported to Xenomai (and which uses the select
> > call) closes all file descriptors in a for loop. The purpose of this
> > loop is, I guess, to avoid leaving a file descriptor opened that was
> > passed through exec.
>
> OK.
>
> So, will you change rtdm_process too? Thanks.
I commited the select support, without any change to rtdm_context_get or
rtdm_process. So, now, how do you prefer this to be fixed, by adding an
mm struct to the rtdm_process struct ? By the way, after thinking about
it I can live without this fix: I just have to stop the loop closing
file descriptors at 768, so that it will not try to close RTDM file
descriptors.
While commiting the support for select, I also had a dependency problem
in Kconfig: when support for posix select is enabled the posix module
uses a function defined in the RTDM module. So, there is one invalid
configuration: posix built-in with support for select and rtdm built as
a module. I could not find a way to express this condition in the
Kconfig language, so I just made a comment depend on this condition, but
would be happy if anyone found a better solution.
--
Gilles Chanteperdrix.
next prev parent reply other threads:[~2008-02-11 21:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 21:32 [Xenomai-core] [patch 0/4] Support for select-like services Gilles Chanteperdrix
2008-02-09 21:33 ` [Xenomai-core] [patch 1/4] nucleus core support " Gilles Chanteperdrix
2008-02-09 21:35 ` [Xenomai-core] [patch 2/4] RTDM support for select-like service Gilles Chanteperdrix
2008-02-10 14:08 ` Jan Kiszka
2008-02-10 14:37 ` Gilles Chanteperdrix
2008-02-10 14:39 ` Gilles Chanteperdrix
2008-02-10 14:48 ` Jan Kiszka
2008-02-10 14:59 ` Gilles Chanteperdrix
2008-02-10 15:37 ` Gilles Chanteperdrix
2008-02-10 21:48 ` Gilles Chanteperdrix
2008-02-10 22:18 ` Jan Kiszka
2008-02-10 22:28 ` Gilles Chanteperdrix
2008-02-10 22:48 ` Jan Kiszka
2008-02-10 22:56 ` Gilles Chanteperdrix
2008-02-11 21:24 ` Gilles Chanteperdrix [this message]
2008-02-11 22:10 ` Jan Kiszka
2008-02-11 22:14 ` Gilles Chanteperdrix
2008-02-11 22:18 ` Jan Kiszka
2008-02-11 22:30 ` Gilles Chanteperdrix
2008-02-12 7:36 ` Jan Kiszka
2008-02-12 10:33 ` Jan Kiszka
2008-02-12 13:27 ` Gilles Chanteperdrix
2008-02-09 21:36 ` [Xenomai-core] [patch 3/4] posix skin kernel-space support for select Gilles Chanteperdrix
2008-02-09 21:37 ` [Xenomai-core] [patch 4/4] posix skin user-space " Gilles Chanteperdrix
2008-02-10 14:17 ` [Xenomai-core] [patch 0/4] Support for select-like services Jan Kiszka
2008-02-11 7:28 ` Johan Borkhuis
2008-02-11 8:34 ` Gilles Chanteperdrix
2008-02-14 15:33 ` Gilles Chanteperdrix
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=18352.48401.264561.143362@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@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.