On Thu, 2011-05-19 at 15:37 +0800, arethe.rtai wrote:
I solved the problem of the shared memory cannot be allocated in the
user space.
Because the shared memory space are allocated from the kheap, but the
kheap is not a mapped heap, i.e. its pages are not reserved.
I init the kheap by xnheap_init_mapped rather than xnheap_init. The
problem is solved.
You have just turned the global system heap to a shared heap, which is
badly wrong. If anywhere, the issue is in create_new_heap(), or in the
_compat_shm_alloc() interface in userland, or a combination of both.
As Gilles told you already, such a 100% reproducible allocation/mapping
issue can not be a generic one, involving the core heap system,
otherwise no skin would ever work. We do depend on the system heap
internally, for almost everything in the system. It is much more likely
a local RTAI skin bug, because this code has bit rot over time, due to
lack of interest and users.
PS: Please keep the list CCed.
Qin Chenggang
2011-05-19
__
arethe.rtai
__
发件人: Philippe Gerum
发送时间: 2011-05-13 14:50:06
收件人: arethe rtai
抄送: Xenomai-core
主题: Re: [Xenomai-core] I suspect the shared memory of Xenomai has
bug.
On Fri, 2011-05-13 at 09:25 +0800, arethe rtai wrote:
HI all:
I always got null while I request a shared memory through RTAI
skins in the user space.
Some bugs maybe exist in the sub-system. I traced the execution
stream of rt_shm_alloc, and found the mmap() operation always return
-22. I suspect the problem should be same while we use other skins,
because the mmap operation is implemented in /ksrc/nucleus/heap.c.
Is there anyone encountered this problem?
No. The fact is that the RTAI skin has not been actively maintained for
years now, so a local bug there is possible. Due to the lack of users
and interest, this skin was removed from the upcoming 2.6.x series.
Regards Arethe.
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
--
Philippe.
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core