[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[rtl] mmap of kernel memory
As the shared memory mechanism described for RtLinuX is medium flexible
only, I woundered
if it would be possible to add the shared memory to something like rt_fifo.
I took some code from ./driver/sound/soundcard.c
My first try:
char * mem;
init_module() /* OK */
{mem=kmalloc(1024,GFPxx); return 0; }
cleanup() /* OK */
{kfree(mem);}
my_read() /* OK */
{put_usr();}
my_write() /* OK */
{get_usr()}
my_mmap() /* says OK but doesNT work */
{remap_page_range();}
failed. I only get zeros in my application that does the mmap() to the
device.
Read or write works fine, also using a real file for mmap in application
works fine too.
Any mechanism knowledge around?
Jens Michaelsen
--- [rtl] ---
For more information on Real-Time Linux see:
http://rtlinux.cs.nmt.edu/