Source-Changes-HG archive

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

[src/trunk]: src Rename VM_INHERIT_* to MAP_INHERIT_* and move them to sys/sy...



details:   https://anonhg.NetBSD.org/src/rev/5c2f2cb17bfc
branches:  trunk
changeset: 495591:5c2f2cb17bfc
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Aug 01 00:53:07 2000 +0000

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

diffstat:

 distrib/sets/lists/comp/mi          |   3 +-
 distrib/sets/lists/comp/obsolete.mi |   3 +-
 lib/libc/sys/minherit.2             |  25 +++++++---
 sys/sys/mman.h                      |  11 ++++-
 sys/uvm/Makefile                    |   4 +-
 sys/uvm/uvm_extern.h                |   3 +-
 sys/uvm/uvm_inherit.h               |  85 -------------------------------------
 sys/uvm/uvm_map.c                   |  14 +++---
 8 files changed, 41 insertions(+), 107 deletions(-)

diffs (273 lines):

diff -r 6f1cd5021259 -r 5c2f2cb17bfc distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Tue Aug 01 00:40:15 2000 +0000
+++ b/distrib/sets/lists/comp/mi        Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.250 2000/07/28 00:15:49 wiz Exp $
+#      $NetBSD: mi,v 1.251 2000/08/01 00:53:14 wiz Exp $
 ./sys                  comp-sysutil-root
 ./usr/bin/addr2line    comp-miscutil-bin
 ./usr/bin/ar           comp-util-bin
@@ -1114,7 +1114,6 @@
 ./usr/include/uvm/uvm_fault.h          comp-c-include
 ./usr/include/uvm/uvm_fault_i.h                comp-c-include
 ./usr/include/uvm/uvm_glue.h           comp-c-include
-./usr/include/uvm/uvm_inherit.h                comp-c-include
 ./usr/include/uvm/uvm_km.h             comp-c-include
 ./usr/include/uvm/uvm_loan.h           comp-c-include
 ./usr/include/uvm/uvm_map.h            comp-c-include
diff -r 6f1cd5021259 -r 5c2f2cb17bfc distrib/sets/lists/comp/obsolete.mi
--- a/distrib/sets/lists/comp/obsolete.mi       Tue Aug 01 00:40:15 2000 +0000
+++ b/distrib/sets/lists/comp/obsolete.mi       Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: obsolete.mi,v 1.25 2000/07/23 14:17:49 wiz Exp $
+# $NetBSD: obsolete.mi,v 1.26 2000/08/01 00:53:15 wiz Exp $
 /usr/bin/genclass
 /usr/include/bfd/ansidecl.h
 /usr/include/bfd/bfd.h
@@ -295,6 +295,7 @@
 /usr/include/sys/vlimit.h
 /usr/include/sys/vsio.h
 /usr/include/ufs/mfs/mfsiom.h
+/usr/include/uvm/uvm_inherit.h
 /usr/include/vm/device_pager.h
 /usr/include/vm/lock.h
 /usr/include/vm/pglist.h
diff -r 6f1cd5021259 -r 5c2f2cb17bfc lib/libc/sys/minherit.2
--- a/lib/libc/sys/minherit.2   Tue Aug 01 00:40:15 2000 +0000
+++ b/lib/libc/sys/minherit.2   Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: minherit.2,v 1.6 2000/06/26 17:00:01 kleink Exp $
+.\"    $NetBSD: minherit.2,v 1.7 2000/08/01 00:53:07 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -52,18 +52,29 @@
 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.
+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 6f1cd5021259 -r 5c2f2cb17bfc sys/sys/mman.h
--- a/sys/sys/mman.h    Tue Aug 01 00:40:15 2000 +0000
+++ b/sys/sys/mman.h    Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mman.h,v 1.26 2000/07/28 09:33:28 kleink Exp $ */
+/*     $NetBSD: mman.h,v 1.27 2000/08/01 00:53:08 wiz Exp $    */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -128,6 +128,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 6f1cd5021259 -r 5c2f2cb17bfc sys/uvm/Makefile
--- a/sys/uvm/Makefile  Tue Aug 01 00:40:15 2000 +0000
+++ b/sys/uvm/Makefile  Tue Aug 01 00:53:07 2000 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.5 2000/06/27 08:49:44 mrg Exp $
+#      $NetBSD: Makefile,v 1.6 2000/08/01 00:53:09 wiz Exp $
 
 KDIR=  /sys/uvm
 INCSDIR= /usr/include/uvm
 
 INCS=  uvm.h uvm_amap.h uvm_amap_i.h uvm_anon.h uvm_aobj.h uvm_device.h \
-       uvm_extern.h uvm_fault.h uvm_fault_i.h uvm_glue.h uvm_inherit.h \
+       uvm_extern.h uvm_fault.h uvm_fault_i.h uvm_glue.h \
        uvm_km.h uvm_loan.h \
        uvm_map.h uvm_map_i.h uvm_object.h uvm_page.h uvm_page_i.h \
        uvm_pager.h uvm_pager_i.h uvm_param.h uvm_pdaemon.h uvm_pglist.h \
diff -r 6f1cd5021259 -r 5c2f2cb17bfc sys/uvm/uvm_extern.h
--- a/sys/uvm/uvm_extern.h      Tue Aug 01 00:40:15 2000 +0000
+++ b/sys/uvm/uvm_extern.h      Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_extern.h,v 1.46 2000/07/24 20:10:51 jeffs Exp $    */
+/*     $NetBSD: uvm_extern.h,v 1.47 2000/08/01 00:53:09 wiz Exp $      */
 
 /*
  *
@@ -326,7 +326,6 @@
 #include <uvm/uvm_param.h>
 #include <sys/lock.h>
 #include <uvm/uvm_prot.h>
-#include <uvm/uvm_inherit.h>
 #include <uvm/uvm_page.h>
 #include <uvm/uvm_pmap.h>
 #include <uvm/uvm_map.h>
diff -r 6f1cd5021259 -r 5c2f2cb17bfc sys/uvm/uvm_inherit.h
--- a/sys/uvm/uvm_inherit.h     Tue Aug 01 00:40:15 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*     $NetBSD: uvm_inherit.h,v 1.1 2000/06/26 14:21:17 mrg Exp $      */
-
-/* 
- * Copyright (c) 1991, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *     @(#)vm_inherit.h        8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- * 
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- * 
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
- * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
- * Carnegie Mellon requests users of this software to return to
- *
- *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
- *  School of Computer Science
- *  Carnegie Mellon University
- *  Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/*
- *     Virtual memory map inheritance definitions.
- */
-
-#ifndef        _VM_INHERIT_
-#define        _VM_INHERIT_
-
-/*
- *     Enumeration of valid values for vm_inherit_t.
- */
-
-#define        VM_INHERIT_SHARE        ((vm_inherit_t) 0)      /* share with child */
-#define        VM_INHERIT_COPY         ((vm_inherit_t) 1)      /* copy into child */
-#define VM_INHERIT_NONE                ((vm_inherit_t) 2)      /* absent from child */
-#define        VM_INHERIT_DONATE_COPY  ((vm_inherit_t) 3)      /* copy and delete */
-
-#define VM_INHERIT_DEFAULT     VM_INHERIT_COPY
-
-#endif /* _VM_INHERIT_ */
diff -r 6f1cd5021259 -r 5c2f2cb17bfc sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Tue Aug 01 00:40:15 2000 +0000
+++ b/sys/uvm/uvm_map.c Tue Aug 01 00:53:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.79 2000/06/27 17:29:26 mrg Exp $ */
+/*     $NetBSD: uvm_map.c,v 1.80 2000/08/01 00:53:11 wiz Exp $ */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -1836,9 +1836,9 @@
            map, start, end, new_inheritance);
 
        switch (new_inheritance) {
-       case VM_INHERIT_NONE:
-       case VM_INHERIT_COPY:
-       case VM_INHERIT_SHARE:
+       case MAP_INHERIT_NONE:
+       case MAP_INHERIT_COPY:
+       case MAP_INHERIT_SHARE:
                break;
        default:
                UVMHIST_LOG(maphist,"<- done (INVALID ARG)",0,0,0,0);
@@ -2925,13 +2925,13 @@
 
 
                switch (old_entry->inheritance) {
-               case VM_INHERIT_NONE:
+               case MAP_INHERIT_NONE:
                        /*
                         * drop the mapping
                         */
                        break;
 
-               case VM_INHERIT_SHARE:
+               case MAP_INHERIT_SHARE:
                        /*
                         * share the mapping: this means we want the old and
                         * new entries to share amaps and backing objects.
@@ -2988,7 +2988,7 @@
 
                        break;
 
-               case VM_INHERIT_COPY:
+               case MAP_INHERIT_COPY:
 
                        /*
                         * copy-on-write the mapping (using mmap's



Home | Main Index | Thread Index | Old Index