Hi, David. Thanks for your reply.

> Can you check CONFIG_TINY_SHMEM=y and CONFIG_RAMFS=y?

Yes. They are both set to "y".


> What was errno?

No error/warning messages.
>From the return value (-1), I know shared memory creation failed.


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

I put the following in my test program:
shmid = shmget( (key_t) 0x1000, 4096, (IPC_CREAT | 0666) );

I got the following when I strace my test program:
......
shmget(4096, 4096, IPC_CREAT|0x1b6|0666) = -1 EINVAL (Invalid argument)
write(1, "SHM: Failed <-1>\n", 17SHM: Failed <-1>
)      = 17
......


> Alternatively, you could put a printk() in do_shmat() in the kernel to
> see if it actually gets there.

I tried putting printk() in do_shmat(), sys_shmget(), shm_init() in
ipc/shm.c. I found that shm_init() was called, but do_shmat() and
sys_shmget() were NOT called.


Do you have idea based on these information?

Thanks again for your help.

Regards,

Allen

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Howells
Sent: Thursday, July 26, 2007 5:10 AM
To: uClinux development list
Subject: Re: [uClinux-dev] uClinux supports shared memory IPC?

Allen Yang <[EMAIL PROTECTED]> 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
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
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
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to