From: Jan Kiszka <jan.kiszka@domain.hid>
To: NZG <ngustavson@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] RTDM problems with structures in headers
Date: Fri, 04 May 2007 17:41:47 +0200 [thread overview]
Message-ID: <463B543B.8060008@domain.hid> (raw)
In-Reply-To: <200705041027.52872.ngustavson@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]
NZG wrote:
> Background
> -------------------------
> I'm developing an rtdm for some simple io inside a PLD.
> This io is detected by a standard linux driver and used to register kobject
> classes in the main driver.
> This in turn results in the registration of a named rtdm driver with the same
> name as the class, which calls down into the classes standard low level
> methods using and RTDM atomic lock around the actual memory mapped
> manipulation.
> In this way I hope to create a standard, kernel detected, interface to
> standard user space and rtdm for simple io devices.
>
> The RTDM device has no "private data" pointer for pointing to outside data
> structures. I would like to avoid modifying it's basic structure to maintain
> compatibility with future releases, and in general to avoid modifying the
> real time core whenever possible.
>
> To get around I have an rtdm device inside the standard class structure, and
> then use the 2.6 "container of" macro from the rtdm driver to get access to
> the original class.
>
> Problems
> -------------------------
> Placing the rtd device inside the standard structure results in the need to
> add extra flags (-Iinclude/xenomai) to every Makefile which contains a device
> including the header file reference to xenomai in it.
>
> Question
> ------------------------
> Essentially, what is the recommended way to:
>
> Pass pointers to a rtdm driver from regular kernel space, which can be
> maintained into the rtdm fops (without resorting to global variables).
>
> Allowing for the assumption that the standard kernel process holding the data
> is responsible for registering the real time driver.
Not claiming that I fully understood your problem yet - code talks:
What about putting the rtdm_device and your standard device structure
into a "meta" structure. The type of the latter then only has be known
to those parts that access data "across" the two structure.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-05-04 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 15:27 [Xenomai-core] RTDM problems with structures in headers NZG
2007-05-04 15:41 ` Jan Kiszka [this message]
2007-05-04 15:58 ` NZG
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=463B543B.8060008@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=ngustavson@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.