Re: shared memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 27, 2002 at 03:15:50PM +0530, karthik wrote:
> what i meant by vitual memory support is not the VFS but the option in 'make
> menuconfig->file system ' rather a support for shm fs (tmpfs), it wasnt
> enabled by default.

I think you are a bit confused. VFS has nothing to do with virtual
memory. You don't need tmpfs for SysV shared memory.

> And also Sys V IPC has been built in to the kernel.I have an entry
> /proc/sysvipc/ .
> 
> System.map has got the symbols for the sys_shmget !
> But still the problem is not solved.
> AFAIK when i do a insmod the module tries to resolve the symbols from the
> exported symbols or look up in System.map ?

If it wasn't clear from my previous message: you are solving your
problem in the wrong way. You don't need SysV shared memory to share
memory between kernel and userland, you just have to implement the
mmap() method in your device driver.


Erik

> Erik Mouw wrote:
> > On Wed, Mar 27, 2002 at 10:28:39AM +0530, karthik wrote:
> > > I am calling sys_shmget in the initialization function of the module..
> > > when i insert the module it crybs for unresolved symbol sys_shmget.
> > > I have Virtual Memory file system support built in kernel(2.4.2) &
> > > compiled my module with the following options
> > > -DMODULE -D__KERNEL__ -O2  ...
> > > Am i missing some of the dependencies ?
> >
> > The kernel is always compiled with virtual memory support, or otherwise
> > it couldn't provide protection. You need to enable SysV IPC.
> >
> > However, the easiest way to share data between the kernel and a driver
> > is to mmap() the device file, so just implement a mmap() method in your
> > driver and you're done.

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux