All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [patch 2/4] RTDM support for select-like service.
Date: Sun, 10 Feb 2008 23:18:06 +0100	[thread overview]
Message-ID: <47AF781E.4070102@domain.hid> (raw)
In-Reply-To: <18351.28960.164520.295075@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>  > Gilles Chanteperdrix wrote:
>  > > stats:
>  > >  include/rtdm/rtdm.h        |    4 ++
>  > >  include/rtdm/rtdm_driver.h |   30 +++++++++++++++-
>  > >  ksrc/skins/rtdm/core.c     |   84 +++++++++++++++++++++++++++++++--------------
>  > >  ksrc/skins/rtdm/device.c   |   10 +++++
>  > >  ksrc/skins/rtdm/drvlib.c   |   76 ++++++++++++++++++++++++++++++++++++----
>  > >  5 files changed, 170 insertions(+), 34 deletions(-)
>  > > 
>  > 
>  > /me thinks that going for inline patches on this list is overdue...
>  > 
>  > > @@ -1148,8 +1208,8 @@ int rtdm_sem_timeddown(rtdm_sem_t *sem, 
>  > >  
>  > >  	if (testbits(sem->synch_base.status, RTDM_SYNCH_DELETED))
>  > >  		err = -EIDRM;
>  > > -	else if (sem->value > 0)
>  > > -		sem->value--;
>  > > +	else if (sem->value > 0 && !--sem->value)
>  > > +			xnselect_signal(&sem->select_block, 0);
>  > >  	else if (timeout < 0) /* non-blocking mode */
>  > >  		err = -EWOULDBLOCK;
>  > >  	else {
>  > 
>  > Uuuh, this doesn't look equivalent (for --sem->value < 0).
>  > 
>  > Otherwise it's OK with me.
> 
> After testing, it appears that the "owner" of a file descriptor changed from 
> current->mm 
> to
> container_of(xnshadow_ppd_get(__rtdm_muxid), struct rtdm_process, ppd)

Yes, indeed, forgot about it. We have a full-blown owner structure now
to track comm and pid.

> 
> So, I now need a ppd hash lookup in __rtdm_context_get.
> 

You could add mm to rtdm_process. This means another indirection and
makes things worse (more cache misses in the worst case...). Could you
live without the check until we have per-process fd tabled, or was it
essential for the select thing?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-02-10 22:18 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 [this message]
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
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=47AF781E.4070102@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.