Source-Changes-HG archive

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

[src/netbsd-1-5]: src Apply patch (approved by jhawk and thorpej):



details:   https://anonhg.NetBSD.org/src/rev/68a5ba4f2b85
branches:  netbsd-1-5
changeset: 488879:68a5ba4f2b85
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sat Aug 05 11:10:42 2000 +0000

description:
Apply patch (approved by jhawk and thorpej):

Rename VM_INHERIT_* to MAP_INHERIT_* and move them to sys/sys/mman.h as
discussed on tech-kern.
Retire sys/vm/vm_inherit.h, update man page for minherit(2).

The patch includes approximately the following diffs (approximately
since -current already used uvm/uvm_inherit.h):
minherit.2:     1.4 -> 1.8
mman.h:         1.26 -> 1.27
powerpc/include/db_machdep.h:   1.7 -> 1.8
pc532/include/db_machdep.h:     1.12 -> 1.13

diffstat:

 distrib/sets/lists/comp/mi            |   3 +--
 distrib/sets/lists/comp/obsolete.mi   |   3 ++-
 lib/libc/sys/minherit.2               |  28 +++++++++++++++++++---------
 sys/arch/pc532/include/db_machdep.h   |   3 +--
 sys/arch/powerpc/include/db_machdep.h |   3 +--
 sys/sys/mman.h                        |  11 ++++++++++-
 sys/vm/Makefile                       |   4 ++--
 sys/vm/vm.h                           |   3 +--
 8 files changed, 37 insertions(+), 21 deletions(-)

diffs (182 lines):

diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sat Aug 05 04:41:58 2000 +0000
+++ b/distrib/sets/lists/comp/mi        Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.231.2.4 2000/07/17 05:59:56 mrg Exp $
+#      $NetBSD: mi,v 1.231.2.5 2000/08/05 11:10:44 wiz Exp $
 ./sys                  comp-sysutil-root
 ./usr/bin/addr2line    comp-miscutil-bin
 ./usr/bin/ar           comp-util-bin
@@ -1131,7 +1131,6 @@
 ./usr/include/vm/pmap.h                comp-c-include
 ./usr/include/vm/vm.h          comp-c-include
 ./usr/include/vm/vm_extern.h           comp-c-include
-./usr/include/vm/vm_inherit.h          comp-c-include
 ./usr/include/vm/vm_kern.h             comp-c-include
 ./usr/include/vm/vm_map.h              comp-c-include
 ./usr/include/vm/vm_object.h           comp-c-include
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 distrib/sets/lists/comp/obsolete.mi
--- a/distrib/sets/lists/comp/obsolete.mi       Sat Aug 05 04:41:58 2000 +0000
+++ b/distrib/sets/lists/comp/obsolete.mi       Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: obsolete.mi,v 1.19.2.2 2000/07/07 16:22:16 itojun Exp $
+# $NetBSD: obsolete.mi,v 1.19.2.3 2000/08/05 11:10:44 wiz Exp $
 /usr/bin/genclass
 /usr/include/bfd/ansidecl.h
 /usr/include/bfd/bfd.h
@@ -300,6 +300,7 @@
 /usr/include/vm/swap_pager.h
 /usr/include/vm/vnode_pager.h
 /usr/include/vm/vm_conf.h
+/usr/include/vm/vm_inherit.h
 /usr/include/vm/vm_swap.h
 /usr/lib/libamu.a
 /usr/lib/libamu_p.a
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 lib/libc/sys/minherit.2
--- a/lib/libc/sys/minherit.2   Sat Aug 05 04:41:58 2000 +0000
+++ b/lib/libc/sys/minherit.2   Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: minherit.2,v 1.3.4.1 2000/06/25 20:30:20 sommerfeld Exp $
+.\"    $NetBSD: minherit.2,v 1.3.4.2 2000/08/05 11:10:42 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -42,7 +42,6 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.Fd #include <sys/types.h>
 .Fd #include <sys/mman.h>
 .Ft int
 .Fn minherit "void *addr" "size_t len" "int inherit"
@@ -52,19 +51,30 @@
 system call
 changes the specified range of virtual addresses to have the specified
 fork-time inheritance characteristic
-.Fa inherit .
-which can be set to VM_INHERIT_NONE, VM_INHERIT_COPY, or VM_INHERIT_SHARE.
+.Fa inherit ,
+which can be set to 
+.Dv MAP_INHERIT_NONE ,
+.Dv MAP_INHERIT_COPY ,
+or
+.Dv MAP_INHERIT_SHARE .
+Also possible is
+.Dv MAP_INHERIT_DEFAULT ,
+which defaults to
+.Dv MAP_INHERIT_COPY .
 Not all implementations will guarantee that the inheritance characteristic
 can be set on a page basis;
 the granularity of changes may be as large as an entire region.
 .Pp
-Normally, the entire address space is marked VM_INHERIT_COPY; when the
-process calls
+Normally, the entire address space is marked 
+.Dv MAP_INHERIT_COPY ;
+when the process calls
 .Fn fork ,
 the child receives a (virtual) copy of the entire address space.
-Pages or regions marked VM_INHERIT_SHARE are shared between the
-address spaces, while pages or regions marked VM_INHERIT_NONE will be
-unmapped in the child.
+Pages or regions marked 
+.Dv MAP_INHERIT_SHARE
+are shared between the address spaces, while pages or regions marked
+.Dv MAP_INHERIT_NONE
+will be unmapped in the child.
 .Sh BUGS
 If the a particular port does not support page-granularity
 inheritance, there's no way to figure out how large a region is
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 sys/arch/pc532/include/db_machdep.h
--- a/sys/arch/pc532/include/db_machdep.h       Sat Aug 05 04:41:58 2000 +0000
+++ b/sys/arch/pc532/include/db_machdep.h       Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.h,v 1.9 1998/09/02 19:17:22 matthias Exp $  */
+/*     $NetBSD: db_machdep.h,v 1.9.22.1 2000/08/05 11:10:43 wiz Exp $  */
 
 /* 
  * Mach Operating System
@@ -48,7 +48,6 @@
 
 #include <vm/vm_prot.h>
 #include <vm/vm_param.h>
-#include <vm/vm_inherit.h>
 
 #include <machine/reg.h>               /* For struct reg */
 #include <machine/psl.h>
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 sys/arch/powerpc/include/db_machdep.h
--- a/sys/arch/powerpc/include/db_machdep.h     Sat Aug 05 04:41:58 2000 +0000
+++ b/sys/arch/powerpc/include/db_machdep.h     Sat Aug 05 11:10:42 2000 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $   */
-/*     $NetBSD: db_machdep.h,v 1.4 1998/08/31 14:43:39 tsubai Exp $    */
+/*     $NetBSD: db_machdep.h,v 1.4.22.1 2000/08/05 11:10:43 wiz Exp $  */
 
 /* 
  * Mach Operating System
@@ -35,7 +35,6 @@
 
 #include <vm/vm_prot.h>
 #include <vm/vm_param.h>
-#include <vm/vm_inherit.h>
 #include <machine/trap.h>
 
 #define        DB_ELF_SYMBOLS
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 sys/sys/mman.h
--- a/sys/sys/mman.h    Sat Aug 05 04:41:58 2000 +0000
+++ b/sys/sys/mman.h    Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mman.h,v 1.24 1999/07/07 06:02:21 thorpej Exp $        */
+/*     $NetBSD: mman.h,v 1.24.12.1 2000/08/05 11:10:43 wiz Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -115,6 +115,15 @@
 #define        MADV_DONTNEED   4       /* dont need these pages */
 #define        MADV_SPACEAVAIL 5       /* insure that resources are reserved */
 #define        MADV_FREE       6       /* pages are empty, free them */
+/*
+ * Flags to minherit
+ */
+#define        MAP_INHERIT_SHARE       0       /* share with child */
+#define        MAP_INHERIT_COPY        1       /* copy into child */
+#define        MAP_INHERIT_NONE        2       /* absent from child */
+#define        MAP_INHERIT_DONATE_COPY 3       /* copy and delete -- not
+                                          implemented in UVM */
+#define        MAP_INHERIT_DEFAULT     MAP_INHERIT_COPY
 #endif
 
 #ifndef _KERNEL
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 sys/vm/Makefile
--- a/sys/vm/Makefile   Sat Aug 05 04:41:58 2000 +0000
+++ b/sys/vm/Makefile   Sat Aug 05 11:10:42 2000 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.4 2000/04/15 18:08:12 mrg Exp $
+#      $NetBSD: Makefile,v 1.4.4.1 2000/08/05 11:10:43 wiz Exp $
 
 KDIR=  /sys/vm
 INCSDIR= /usr/include/vm
 
 INCS=  pglist.h pmap.h vm.h \
-       vm_extern.h vm_inherit.h vm_kern.h vm_map.h vm_object.h vm_page.h \
+       vm_extern.h vm_kern.h vm_map.h vm_object.h vm_page.h \
        vm_pageout.h vm_pager.h vm_param.h vm_prot.h
 
 .include <bsd.kinc.mk>
diff -r 3ae01bba2ce9 -r 68a5ba4f2b85 sys/vm/vm.h
--- a/sys/vm/vm.h       Sat Aug 05 04:41:58 2000 +0000
+++ b/sys/vm/vm.h       Sat Aug 05 11:10:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.h,v 1.22 2000/03/26 20:54:48 kleink Exp $   */
+/*     $NetBSD: vm.h,v 1.22.4.1 2000/08/05 11:10:43 wiz Exp $  */
 
 /*
  * Copyright (c) 1991, 1993
@@ -58,7 +58,6 @@
 #include <vm/vm_param.h>
 #include <sys/lock.h>
 #include <vm/vm_prot.h>
-#include <vm/vm_inherit.h>
 #include <vm/vm_map.h>
 #include <vm/vm_page.h>
 #include <vm/vm_pager.h>



Home | Main Index | Thread Index | Old Index