Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add an optional pmap hook, pmap_fork(), to be called at ...



details:   https://anonhg.NetBSD.org/src/rev/021dbd0ec059
branches:  trunk
changeset: 472930:021dbd0ec059
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 12 19:11:23 1999 +0000

description:
Add an optional pmap hook, pmap_fork(), to be called at the end of
uvmspace_fork().

pmap_fork() is used to "fork a pmap", that is copy data from one pmap
to the other that is NOT related to actual mappings in the pmap, but is
otherwise logically coupled to the address space.

diffstat:

 sys/uvm/uvm_map.c |  6 +++++-
 sys/vm/pmap.h     |  8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 5a3b211675bc -r 021dbd0ec059 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Wed May 12 18:59:23 1999 +0000
+++ b/sys/uvm/uvm_map.c Wed May 12 19:11:23 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.38 1999/05/03 08:57:42 mrg Exp $ */
+/*     $NetBSD: uvm_map.c,v 1.39 1999/05/12 19:11:23 thorpej Exp $     */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -2758,6 +2758,10 @@
                shmfork(vm1, vm2);
 #endif
 
+#ifdef PMAP_FORK
+       pmap_fork(vm1->vm_map.pmap, vm2->vm_map.pmap);
+#endif
+
        UVMHIST_LOG(maphist,"<- done",0,0,0,0);
        return(vm2);    
 }
diff -r 5a3b211675bc -r 021dbd0ec059 sys/vm/pmap.h
--- a/sys/vm/pmap.h     Wed May 12 18:59:23 1999 +0000
+++ b/sys/vm/pmap.h     Wed May 12 19:11:23 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.29 1999/03/26 21:58:39 mycroft Exp $        */
+/*     $NetBSD: pmap.h,v 1.30 1999/05/12 19:11:24 thorpej Exp $        */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -185,11 +185,15 @@
 void            pmap_zero_page __P((paddr_t));
 
 #if defined(PMAP_STEAL_MEMORY)
-vaddr_t         pmap_steal_memory __P((vsize_t, paddr_t *,
+vaddr_t                 pmap_steal_memory __P((vsize_t, paddr_t *,
                    paddr_t *));
 #else
 void            pmap_virtual_space __P((vaddr_t *, vaddr_t *));
 #endif
+
+#if defined(PMAP_FORK)
+void           pmap_fork __P((pmap_t, pmap_t));
+#endif
 __END_DECLS
 #endif /* kernel*/
 #endif  /* PMAP_EXCLUDE_DECLS */



Home | Main Index | Thread Index | Old Index