[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-rt
Subject:    Re: [Rtl] A question of writing file in rtlinux, thanks
From:       Der Herr Hofrat <der.herr () hofr ! at>
Date:       2005-02-13 8:27:17
Message-ID: 200502130827.j1D8RHb08826 () hofr ! at
[Download RAW message or body]

> 
> Dear Everybody:
>         Nice to meet u in the web!
>         Now I'm using rtlinux/free v3.1 and I want to
> write some data to a file once per 5 ms. I'm little
> confused whether I can only use rtlinux's fifo/mbuff
> or  I can use some normal kernel function such as
> "filp_open" or kernel side system call such as
> "open/write"? 
>
check out the examples in the 3.2 tree -> examples/kernel_resources/
you can write to a file directly using filp_open - but you must do it from
kernel context - one way is to use a kernel thread that reads a buffer that
is filled by the rt-task (thats quite fast actually).
If you use fifos, note that they show the maximum bandwith with fairly small
sizes (8kB in the last tests we did) so depending on the data volume this 
can be a sufficiently efficient solution (though with no check for lost data
on the side of the fifo - you would have to implement such a check your self).
moving data with mbuff is not as efficient as fifos - so you will generally
use it if the data access patern is not simply a stream in which case fifos
are more efficient.

hofrat
_______________________________________________
Rtl mailing list
Rtl@rtlinux.org
http://www2.fsmlabs.com/mailman/listinfo/rtl
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic