On Thu, Aug 16, 2001 at 06:28:16PM -0400, Calin Culianu wrote:
> On Thu, 16 Aug 2001, Victor Yodaiken wrote:
>
> > On Thu, Aug 16, 2001 at 04:17:48PM -0400, Calin Culianu wrote:
> > > Notice that unlike the rtf_put() function in rt-linux, the read() system
> > > call actually was well enough written to work with void *. It escapes me
> > > why the rt-linux developers chose char * as opposed to void * for their
> > > second argument to rtf_put(). All I have seen it to do to date was
> > > confuse novices. Can anyone enlighten me on this fine point?
> >
> > Yes. The answer is "lack of thought" - rtf_put was quite early and the early
> > UNIX "read" was prior to the invention of "void *" so we didn't think about
> > it.
> > Note that RTLinux now has a POSIX interface to RTF and you can do
> > fd = open("/dev/rft2",O_WRONLY | O_NBLK );
> >
> > write(fd, voidpointer, n);
> >
> > To make things nicely symmetrical.
>
> Ah.. so rtlinux implements some posix functions like open() and write()?
> Are these basically wrappers to lower-level kernel functions like
> filp_open in fs/open.c? (You couldn't use sys_open since this is all
> kernel space).
Yep they are wrappers. sys_open would be dangerous. The advantage of the posix
functions is that when we optimize rtfifos we can do so transparently, but it's
going to be harder to do that with the rtf_put/get api.
> Hey.. I know this is a newbie-style question: but what are the advantages
> of RTF files over regular fifo's? Do they have some guarantees as to the
> fact that any non-realtime tasks waiting on them are more likely to get
> awoken right away?
The rtfifos are designed to make sure that the RT side cannot block on operations of
the non-RT side. We will add blocking to the read/write interface, but the basic
RTL idea is that RT components _never_ block unless they specifically ask for it.
RTfifos do something peculiar - they provide an interface between the RT world
and Linux so the implementation looks very different on the two sides.
>
> -Calin
>
> >
> >
> > >
> > > -Calin
> > >
> > > >
> > > > mbuff looks interesting but I have found the doc to be sparse.
> > > >
> > > > I am sure that many of you have had to do this, so I would like to hear your
> > > > opinions. Code snippets would be appreciated to help me along.
> > > >
> > > > Thank-you!
> > > >
> > > > Oliver
> > > > National Test Pilot School
> > > >
> > > > -- [rtl] ---
> > > > To unsubscribe:
> > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > > > --
> > > > For more information on Real-Time Linux see:
> > > > http://www.rtlinux.org/
> > > >
> > > >
> > >
> > > -- [rtl] ---
> > > To unsubscribe:
> > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > > --
> > > For more information on Real-Time Linux see:
> > > http://www.rtlinux.org/
> >
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/