Try the vremap() call in your RTL module:

shmem = (SHMEM_ST *) vremap(SHMEM_BASE_ADDRESS,sizeof(SHMEM_ST));

don't forget to call vfree() in your module clean-up:

vfree(shmem);

In the 2.2-version you'll need the __va() macro to serve the same purpose.

-Don

On Tue, 8 Jun 1999, Estabridis, Janet P wrote:

> Hi, 
> I have read all the old messages on shared memory and nothing has helped.
> 
> I have been attempting to use shared memory as is spelled out in the paper
> "Using Shared Memory in Real-Time Linux" by Fredrick M. Proctor and in your
> "HOWTO." I am confused and if you have any suggestions I'd appreciate it. 
> 
>  1. I have gotten shared memory to work with two non-real time applications.
> But, when I try and add a rt application the real-time application appears
> to be accessing different memory because if I write a new value to the
> shared memory the applications don't see it.  I have verified that the
> pointer to memory in the real-time application and the pointers in the linux
> applications all contain the same address.  I did this by passing the rt_ptr
> through a FIFO to the non-real time application and doing an fprintf.  
> 
> what I mean is that the  user_ptr = (BLOCK *) mmap ( .... ) from the linux
> applications is the same as the address pointer in the real-time application
> char *rt_ptr = ADDRESS 
> 
> So, why aren't the accessing the same memory?? user_ptr = 0x7d00000 and
> rt_ptr = 0x7d00000 but why doesn't the application see it when the rt
> process initializes the block structure to a value ?? i.e. rt_ptr->block[0]=
> 500 or rt_ptr->block[10] = 444; 
> 
> I use a common header file where 
> 
> struct { 
> unsigned short block[5000]; 
> } BLOCK; 
> 
> Any suggestions ?? 
> 
> I am using Kernel 2.0.36 and RTL v1.1
> I have 128Mbytes of memory on a pentinum II and I want to use close to
> 4Bytes maximum eventually, so my lilo.conf has    append="mem=125m"
> 
> I am very new to Linux so would appreciate any help in finding the answer.
> 
> Thanks 
> 
> 
> Janet Estabridis
> Electrical Engineer
> NAWC Code 473E00D
> China Lake, CA 93555
> (760) 939-2896  FAX (760) 939 -3075
> 
> 

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