Martin et. al.,

        To expand slightly on an earlier answer from another poster:

> 31/01/2001 08:39:27, Martin Stoffel <[EMAIL PROTECTED]> wrote:
>
> >is it possible to open an ordinary file in the real-time code?
> >
> >... init_module(){
> >     fd=open("filename",O_RDONLY);
> >...
> >    }

> And Kumsta Christofe replied:
> no.

        The longer answer is that there is no such file I/O available from
the RTL world.  If you really think you need file I/O from RTL, you should
probably closely examine either why you are using RTL or what you are doing
with that file.  File systems are, for the most part, non-deterministic.
Thus using files in an RT task is bad news.

        Having said that, you are probably interested in using the file for
either initialization or result storage.  The common way of handing
initialization from the non-RTL world is to pass initialization parameters
through a FIFO to the RTL task.  The common way to handle result storage to
files is to pass the results through a FIFO to a Linux process which then
stores the data.  By making the FIFOs big enough to offer some buffering,
you can simply look at them as disk buffers for all intents and purposes.
The code to actually handle writing the files, etc. is pretty simple.

Regards,

Steve
-- [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/rtlinux/

Reply via email to