From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [BUG] commit #1833 breaks rt_queue_create
Date: Wed, 15 Nov 2006 22:23:01 +0100 [thread overview]
Message-ID: <455B8535.6030106@domain.hid> (raw)
In-Reply-To: <455B82F3.702@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
Jan Kiszka wrote:
> 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,
Wasn't someone recently writing in the wiki, one should post plain-text
patches here...?
Hope this one is less octet-streamed.
[-- Attachment #2: fix-mapped-heap-size.patch --]
[-- Type: text/plain, Size: 736 bytes --]
Index: ksrc/nucleus/heap.c
===================================================================
--- ksrc/nucleus/heap.c (Revision 1835)
+++ ksrc/nucleus/heap.c (Arbeitskopie)
@@ -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 *heap
xnlock_put_irqrestore(&nklock, s);
__unreserve_and_free_heap(heap->archdep.heapbase,
- heap->extentsize, heap->archdep.kmflags);
+ xnheap_size(heap), heap->archdep.kmflags);
return 0;
}
next prev parent reply other threads:[~2006-11-15 21:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 21:13 [Xenomai-core] [BUG] commit #1833 breaks rt_queue_create Jan Kiszka
2006-11-15 21:23 ` Jan Kiszka [this message]
2006-11-15 22:17 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=455B8535.6030106@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.