On Thu, 24 Dec 1998, Phil Daly wrote:
>
> I am trying to get shared memory to work but as soon as I access it from the
> real-time side, I get a major crash. I have followed the procedure in the
> HOWTO with my own structures. The line that offends is
> 
>    rtl_mptr->apdData[0].rawData[0] = 1;
> 
> and the /var/log/messages file contains the illuminating information:
> 
>     Unable to handle kernel paging request at virtual address c1f00018

I struggled with this a while ago.  The answer is that the HOWTO
is not currently up to date.  The answer is in the following message,
poster to this list last July:

http://rtlinux.cs.nmt.edu/~rtlinux/rtl.w3archive/9807/msg00078.html

Here is the snippet you are looking for.

> Regarding the Shared Memory HOWTO discussion, I have found it impossible
> to get the:
>   ... in an rt-module...
>          char *rt_ptr = ADDRESS;
>
> technique to work. It results in a segmentation fault (Unable to handle
> paging request...) in all cases.
>
> By using:
>          char *rt_ptr;
>          rt_ptr = (char *)vremap(ADDRESS,LENGTH);
>
>    ( and the appropriate vfree(rt_ptr) in the cleanup_module func)
>
>everything seems to work as expected.

If you want to see a relatively simple shared memory application
in action, visit my RTL demo program "BUZZ" at

http://mrb.niddk.nih.gov/butera/software/buzz.html

-- 
  Rob Butera, Postdoctoral Fellow           http://mrb.niddk.nih.gov/butera/ 
  Laboratory for Neural Control, NINDS                    
  National Institutes of Health, Bethesda, MD USA         


--- [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