BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / vm / vm_map.h
index 5e552b2..719c984 100644 (file)
@@ -1,16 +1,65 @@
 /* 
 /* 
- * Copyright (c) 1985, Avadis Tevanian, Jr., Michael Wayne Young
- * Copyright (c) 1987 Carnegie-Mellon University
  * Copyright (c) 1991 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.
  *
  * Copyright (c) 1991 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.
  *
- * The CMU software License Agreement specifies the terms and conditions
- * for use and redistribution.
+ * 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.
  *
  *
- *     @(#)vm_map.h    7.1 (Berkeley) %G%
+ * 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_map.h    7.3 (Berkeley) 4/21/91
+ *
+ *
+ * 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
+ *  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.
  */
 
 /*
  */
 
 /*
 #ifndef        _VM_MAP_
 #define        _VM_MAP_
 
 #ifndef        _VM_MAP_
 #define        _VM_MAP_
 
-#ifdef KERNEL
-#include "types.h"
-#include "lock.h"
-#include "../vm/pmap.h"
-#include "../vm/vm_prot.h"
-#include "../vm/vm_inherit.h"
-#include "../vm/vm_object.h"
-#else
-#include <sys/types.h>
-#include <sys/lock.h>
-#include <vm/pmap.h>
-#include <vm/vm_prot.h>
-#include <vm/vm_inherit.h>
-#include <vm/vm_object.h>
-#endif
-
 /*
  *     Types defined:
  *
 /*
  *     Types defined:
  *
@@ -85,8 +118,6 @@ struct vm_map_entry {
 
 typedef struct vm_map_entry    *vm_map_entry_t;
 
 
 typedef struct vm_map_entry    *vm_map_entry_t;
 
-#define        VM_MAP_ENTRY_NULL       ((vm_map_entry_t) 0)
-
 /*
  *     Maps are doubly-linked lists of map entries, kept sorted
  *     by address.  A single hint is provided to start
 /*
  *     Maps are doubly-linked lists of map entries, kept sorted
  *     by address.  A single hint is provided to start
@@ -94,10 +125,10 @@ typedef struct vm_map_entry        *vm_map_entry_t;
  *     insertion, or removal.
  */
 struct vm_map {
  *     insertion, or removal.
  */
 struct vm_map {
+       struct pmap *           pmap;           /* Physical map */
        lock_data_t             lock;           /* Lock for map data */
        struct vm_map_entry     header;         /* List of entries */
        int                     nentries;       /* Number of entries */
        lock_data_t             lock;           /* Lock for map data */
        struct vm_map_entry     header;         /* List of entries */
        int                     nentries;       /* Number of entries */
-       pmap_t                  pmap;           /* Physical map */
        vm_size_t               size;           /* virtual size */
        boolean_t               is_main_map;    /* Am I a main map? */
        int                     ref_count;      /* Reference count */
        vm_size_t               size;           /* virtual size */
        boolean_t               is_main_map;    /* Am I a main map? */
        int                     ref_count;      /* Reference count */
@@ -113,8 +144,6 @@ struct vm_map {
 
 typedef        struct vm_map   *vm_map_t;
 
 
 typedef        struct vm_map   *vm_map_t;
 
-#define                VM_MAP_NULL     ((vm_map_t) 0)
-
 /*
  *     Map versions are used to validate a previous lookup attempt.
  *
 /*
  *     Map versions are used to validate a previous lookup attempt.
  *
@@ -156,7 +185,6 @@ void                vm_map_lookup_done();
 int            vm_map_protect();
 int            vm_map_inherit();
 int            vm_map_copy();
 int            vm_map_protect();
 int            vm_map_inherit();
 int            vm_map_copy();
-vm_map_t       vm_map_fork();
 void           vm_map_print();
 void           vm_map_copy_entry();
 boolean_t      vm_map_verify();
 void           vm_map_print();
 void           vm_map_copy_entry();
 boolean_t      vm_map_verify();