Hi, Gerrit.

 

1. CONFIG_TMPFS is already set to "y"

2. directory /dev/shm is already in my current image

3. tmpfs is not in my system. So I used "mount -t tmpfs tmpfs /dev/shm".
Then I double checked:

 

# mount

/dev/rom0 on / type romfs (ro)

/proc on /proc type proc (rw)

rwfs on /mnt/rwfs type ramfs (rw)

rwfs on /tmp type ramfs (rw)

rwfs on /etc type ramfs (rw)

rwfs on /var type ramfs (rw)

sysfs on /sys type sysfs (rw)

tmpfs on /dev/shm type tmpfs (rw)

 

tmpfs is now in my system.

 

4. I tried my test program. It still didn't work. shmget() still returns
-1.

 

Regards,

 

Allen Yang

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gerrit Binnenmars
Sent: Thursday, July 26, 2007 12:41 PM
To: uClinux development list
Subject: Re: [uClinux-dev] uClinux supports shared memory IPC?

 

Hello Allen,

Since 2.6.15 uClinux has support for shared memory. Do the following
steps:

- compile your kernel with CONFIG_TMPFS 
- mkdir /dev/shm
- mount -t tmpfs tmpfs /dev/shm

Now shared memory should be working!

Greetings Gerrit




        > Datum: 26/07/07 11:11 AM
        > Van: "David Howells" 
        > Aan: "uClinux development list" 
        > CC: 
        > Onderwerp : Re: [uClinux-dev] uClinux supports shared memory
IPC?
        > 
        > Allen Yang wrote:
        > 
        > > I am using ColdFire MCF5329EVB and uClinux (2.6.17 kernel,
uClibc
        > > 0.9.27).
        > 
        > 2.6.17 certainly has support for it.
        > 
        > Can you check CONFIG_TINY_SHMEM=y and CONFIG_RAMFS=y?
        > 
        > > The compilation was OK. However, when I downloaded to my
board, the
        > > shared memory creation always failed. shmid was always -1.
        > 
        > What was errno?
        > 
        > Also, can you strace your test program to make sure that it's
not the C
        > library aborting the call before the kernel is consulted?
Alternatively, you
        > could put a printk() in do_shmat() in the kernel to see if it
actually gets
        > there.
        > 
        > David
        > 
        > _______________________________________________
        > uClinux-dev mailing list
        > uClinux-dev@uclinux.org
        > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
        > This message was resent by uclinux-dev@uclinux.org
        > To unsubscribe see:
        > http://mailman.uclinux.org/mailman/options/uclinux-dev
        > 
        > 






The information contained in this email and attachments to this email are the 
proprietary and confidential property 
of Nucomm, Inc.  The information is provided in strict confidence and shall not 
be reproduced, copied, or
used (partially or wholly) in any manner without prior, express written 
authorization of Nucomm, Inc.

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to