Module: xenomai-2.4
Branch: master
Commit: 559908c45aa37589449f636f96fc284da570dbd5
URL:    
http://git.xenomai.org/?p=xenomai-2.4.git;a=commit;h=559908c45aa37589449f636f96fc284da570dbd5

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Nov 10 11:50:24 2009 +0100

nucleus: Track heap mapping on to mm-clone

Backport -head commit a6211481.

---

 ksrc/nucleus/heap.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ksrc/nucleus/heap.c b/ksrc/nucleus/heap.c
index 49cab1d..1c02183 100644
--- a/ksrc/nucleus/heap.c
+++ b/ksrc/nucleus/heap.c
@@ -1014,6 +1014,13 @@ static void __unreserve_and_free_heap(void *ptr, size_t 
size, int kmflags)
        }
 }
 
+static void xnheap_vmopen(struct vm_area_struct *vma)
+{
+       xnheap_t *heap = vma->vm_private_data;
+       atomic_inc(&heap->archdep.numaps);
+       xnarch_memory_barrier();
+}
+
 static void xnheap_vmclose(struct vm_area_struct *vma)
 {
        xnheap_t *heap = vma->vm_private_data;
@@ -1037,7 +1044,8 @@ static void xnheap_vmclose(struct vm_area_struct *vma)
 }
 
 static struct vm_operations_struct xnheap_vmops = {
-      .close = &xnheap_vmclose
+       .open = &xnheap_vmopen,
+       .close = &xnheap_vmclose
 };
 
 static int xnheap_open(struct inode *inode, struct file *file)


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

Reply via email to