Fillod Stephane wrote:
> Philippe Gerum wrote:
>> Fillod Stephane wrote:
>>> For the legacy RTAI application to load, the attached patch was
>>> necessary.
>>> The patch against ksrc/skins/rtai/shm.c is somewhat defeating the
>>> purpose
>>> of a lower XNCORE_PAGE_SIZE, so a better fix might be expected.
>>>
>> This one should prevent -EINVAL from being returned. Hopefully.
> 
> Nope, it doesn't :-(
> Most probably because still (hdrsize + 2 * pagesize > heapsize).
> 

This rounding was missing too. We need the previous one for kernel local
 heaps, and the one below to meet the stricter PAGE_SIZE constraint for
shareable heaps.

--- ksrc/nucleus/heap.c (revision 3095)
+++ ksrc/nucleus/heap.c (working copy)
@@ -1103,7 +1103,7 @@
        spl_t s;
        int err;

-       heapsize = PAGE_ALIGN(heapsize);
+       heapsize = xnheap_rounded_size(heapsize, PAGE_SIZE);
        heapbase = __alloc_and_reserve_heap(heapsize, memflags);

        if (!heapbase)

-- 
Philippe.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to