commit #1833 breaks rt_queue_create
As xnheap_size() changed, a sanity check in xnheap_mmap fails now, at least for SVN head, maybe also 2.2.x.
I would suggest the following patch to fix this, though I'm not 100% sure its correct in all cases (do we ever come across a heap of multiple extents in xnheap_mmap?).
Jan
PS: I'll spent a beer (or two...) for the one who starts writing a testsuite for the native skin - in user-space, please, to catch also issues like this one.
nucleus/heap.c +2 -2
@@ -952,7 +952,7 @@ static int xnheap_mmap(struct file *file size = vma->vm_end - vma->vm_start; heap = (xnheap_t *)file->private_data; -if (size != heap->extentsize) +if (size !=xnheap_size (heap))return -ENXIO ;/* Doesn't match the heap size. */ vma->vm_ops = &xnheap_vmops;
@@ -1135,7 +1135,7 @@ int xnheap_destroy_mapped(xnheap_t *heapxnlock_put_irqrestore (&nklock, s);__unreserve_and_free_heap (heap->archdep.heapbase, - heap->extentsize, heap->archdep.kmflags); +xnheap_size (heap), heap->archdep.kmflags);return 0 ; }