From: Jan Kiszka <jan.kiszka@domain.hid>
To: Steven Kauffmann <steven.kauffmann@domain.hid>
Cc: xenomai@xenomai.org, trem <tremyfr@domain.hid>
Subject: Re: [Xenomai-help] RTDM context_size question
Date: Thu, 16 Aug 2007 19:59:12 +0200 [thread overview]
Message-ID: <46C49070.8070807@domain.hid> (raw)
In-Reply-To: <ff1d78710708160504s3f44571fkf12f405c1e71b4f6@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]
Steven Kauffmann wrote:
> Hi
>
> When looking at the rtdm examples tut01-skeleton en tut02-skeleton, I have a
> question about the context_size in the rtdm_device struct.
>
> In tut01-skeleton-drv.c, the context_size = sizeof(buffer_t), in the other
> example context_size = 0. Both drivers uses the
> rtdm_safe_copy_to_user/rtdm_safe_copy_from_user functions to write/read data
> from buffer_t(kernel space) to user_space. So I don't understand why the
> context_size in tut02 is different than in tut01. Or is the context_size
> only important if we open the driver several times from one or more
> user_space programs?
The context size is important in case you want to attach some data to
each opened instance of a device. Hmm, but this is something neither
tut01 nor tut02 deals with optimally. tut02 cannot use a context-based
buffer, because it uses two device instances (opened by two instances of
the user space program) to transfer the data. But tut01 could use some
global buffer as well without loosing a feature.
Philippe (trem), could you rework tut01 and make it use a global buffer
instead? Then some tut03 would be nice to explain what per context, per
device, and global data means. I've seen confusion about this fairly
often, so a dedicated tutorial would be great.
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-08-16 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 12:04 [Xenomai-help] RTDM context_size question Steven Kauffmann
2007-08-16 17:59 ` Jan Kiszka [this message]
2007-08-16 20:59 ` trem
2007-08-17 8:17 ` Jan Kiszka
2007-08-17 22:43 ` trem
[not found] ` <46C5E4AC.1090608@domain.hid>
2007-08-18 6:34 ` [Xenomai-core] " Jan Kiszka
2007-08-20 21:15 ` trem
[not found] ` <46C9FFDA.8030200@domain.hid>
2007-08-23 20:33 ` Jan Kiszka
2007-08-23 20:43 ` trem
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=46C49070.8070807@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=steven.kauffmann@domain.hid \
--cc=tremyfr@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.