All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: xenomai@xenomai.org
Subject: [Xenomai-core] Re: [shirq] first test results
Date: Sun, 12 Feb 2006 23:36:24 +0100	[thread overview]
Message-ID: <43EFB868.60305@domain.hid> (raw)
In-Reply-To: <b647ffbd0602111058v3e8c6790w@domain.hid>

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

Dmitry Adamushko wrote:
>>> Then I stumbled over the xnintr structure. Why do you keep a copy of the
>>>> device name?
>>>> A "const char *" should be enough, we just have to demand
>>>> that it will remain valid as long as the xnintr structure itself (i.e.
>>>> during the IRQ being attached). Saves a few bytes. :)
>>> Could be if all the users of it are initially kernel-mode entities.
>>>
>>> But e.g. there is a version of rt_intr_create() that may be called by
>>> user-space
>>> apps and I extended it to support the "name" parameter too :
>>>
>>> int rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, int
>> mode);
>>> In such a case, the kernel-side rt_intr_create() is called with the
>> "name"
>>> allocated on the stack in skins/native/syscall.c : __rt_intr_create())
>>> so the initial copy of the name can not remain valid.
>> But you could create buffer space for a copy of the name in the same
>> block already allocated for RT_INTR. Should be straightforward.
> 
> 
> RT_INTR does not have the "name" field any more. I have removed it after
> adding the same field to the xnintr_t as it became redundant.
> 
> To access the "name", any code in native skin does "intr->intr_base.name"
> (intr_base is of "xnintr_t" type).
> 

I was rather thinking of allocating RT_INTR + some additional space to
take the name passed from user-space. Then intr_base.name could point to
this buffer instead of static memory in the kernel use case.

Jan


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

  reply	other threads:[~2006-02-12 22:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 18:03 [Xenomai-core] [shirq] first test results Jan Kiszka
2006-02-11 11:31 ` [Xenomai-core] " Dmitry Adamushko
2006-02-11 12:59   ` Jan Kiszka
2006-02-11 18:58     ` Dmitry Adamushko
2006-02-12 22:36       ` Jan Kiszka [this message]
2006-02-13 18:44       ` Jan Kiszka
2006-02-14  8:07         ` Dmitry Adamushko

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=43EFB868.60305@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=dmitry.adamushko@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.