Source-Changes-HG archive

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

[src/trunk]: src/sys/vm rip out some old-vm specific definitions and prototyp...



details:   https://anonhg.NetBSD.org/src/rev/1359a1deac52
branches:  trunk
changeset: 471753:1359a1deac52
user:      drochner <drochner%NetBSD.org@localhost>
date:      Sat Apr 10 13:52:11 1999 +0000

description:
rip out some old-vm specific definitions and prototypes for address space
sanity

diffstat:

 sys/vm/vm.h        |   11 +--
 sys/vm/vm_extern.h |   43 +-------------
 sys/vm/vm_map.h    |   52 +----------------
 sys/vm/vm_object.h |  160 +----------------------------------------------------
 sys/vm/vm_page.h   |   25 +-------
 sys/vm/vm_pager.h  |   93 +------------------------------
 sys/vm/vm_param.h  |    6 +-
 7 files changed, 9 insertions(+), 381 deletions(-)

diffs (truncated from 503 to 300 lines):

diff -r e83788a72eca -r 1359a1deac52 sys/vm/vm.h
--- a/sys/vm/vm.h       Sat Apr 10 13:05:18 1999 +0000
+++ b/sys/vm/vm.h       Sat Apr 10 13:52:11 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.h,v 1.20 1999/03/24 05:51:33 mrg Exp $      */
+/*     $NetBSD: vm.h,v 1.21 1999/04/10 13:52:11 drochner Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -49,15 +49,9 @@
 struct vm_map;
 typedef struct vm_map *vm_map_t;
 
-struct vm_object;
-typedef struct vm_object *vm_object_t;
-
 struct vm_page;
 typedef struct vm_page  *vm_page_t;
 
-struct pager_struct;
-typedef struct pager_struct *vm_pager_t;
-
 #include <sys/vmmeter.h>
 #include <sys/queue.h>
 #include <vm/vm_param.h>
@@ -65,7 +59,8 @@
 #include <vm/vm_prot.h>
 #include <vm/vm_inherit.h>
 #include <vm/vm_map.h>
-#include <vm/vm_object.h>
+#include <vm/vm_page.h>
+#include <vm/vm_pager.h>
 #include <vm/pmap.h>
 #include <vm/vm_extern.h>
 
diff -r e83788a72eca -r 1359a1deac52 sys/vm/vm_extern.h
--- a/sys/vm/vm_extern.h        Sat Apr 10 13:05:18 1999 +0000
+++ b/sys/vm/vm_extern.h        Sat Apr 10 13:52:11 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_extern.h,v 1.43 1999/03/24 05:51:33 mrg Exp $       */
+/*     $NetBSD: vm_extern.h,v 1.44 1999/04/10 13:52:11 drochner Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -46,49 +46,8 @@
 struct core;
 
 #ifdef _KERNEL
-#ifdef TYPEDEF_FOR_UAP
-int             compat_43_getpagesize __P((struct proc *p, void *, int *));
-int             madvise __P((struct proc *, void *, int *));
-int             mincore __P((struct proc *, void *, int *));
-int             mprotect __P((struct proc *, void *, int *));
-int             msync __P((struct proc *, void *, int *));
-int             munmap __P((struct proc *, void *, int *));
-int             obreak __P((struct proc *, void *, int *));
-int             sbrk __P((struct proc *, void *, int *));
-int             smmap __P((struct proc *, void *, int *));
-int             sstk __P((struct proc *, void *, int *));
-#endif
 
-void            assert_wait __P((void *, boolean_t));
 void            iprintf __P((void (*)(const char *, ...), const char *, ...));
-int             kinfo_loadavg __P((int, char *, int *, int, int *));
-int             kinfo_meter __P((int, caddr_t, int *, int, int *));
-vaddr_t                 kmem_alloc __P((vm_map_t, vsize_t));
-vaddr_t                 kmem_alloc_pageable __P((vm_map_t, vsize_t));
-vaddr_t                 kmem_alloc_wait __P((vm_map_t, vsize_t));
-void            kmem_free __P((vm_map_t, vaddr_t, vsize_t));
-void            kmem_free_wakeup __P((vm_map_t, vaddr_t, vsize_t));
-void            kmem_init __P((vaddr_t, vaddr_t));
-vaddr_t                 kmem_malloc __P((vm_map_t, vsize_t, boolean_t));
-vm_map_t        kmem_suballoc __P((vm_map_t, vaddr_t *, vaddr_t *,
-                                   vsize_t, boolean_t));
-vaddr_t                 kmem_alloc_poolpage1 __P((vm_map_t, boolean_t));
-void            kmem_free_poolpage1 __P((vm_map_t, vaddr_t));
-
-#define        kmem_alloc_poolpage(waitok)     kmem_alloc_poolpage1(kmem_map, (waitok))
-#define        kmem_free_poolpage(addr)        kmem_free_poolpage1(kmem_map, (addr))
-
-void            loadav __P((struct loadavg *));
-int             pager_cache __P((vm_object_t, boolean_t));
-void            sched __P((void));
-int             svm_allocate __P((struct proc *, void *, int *));
-int             svm_deallocate __P((struct proc *, void *, int *));
-int             svm_inherit __P((struct proc *, void *, int *));
-int             svm_protect __P((struct proc *, void *, int *));
-void            swapinit __P((void));
-int             swfree __P((struct proc *, int));
-void            swstrategy __P((struct buf *));
-void            thread_block __P((char *));
 void            thread_sleep_msg __P((void *, simple_lock_t,
                     boolean_t, char *, int));
 
diff -r e83788a72eca -r 1359a1deac52 sys/vm/vm_map.h
--- a/sys/vm/vm_map.h   Sat Apr 10 13:05:18 1999 +0000
+++ b/sys/vm/vm_map.h   Sat Apr 10 13:52:11 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_map.h,v 1.23 1999/03/31 12:29:51 mrg Exp $  */
+/*     $NetBSD: vm_map.h,v 1.24 1999/04/10 13:52:11 drochner Exp $     */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -224,54 +224,4 @@
 #endif
 #endif /* !defined MAX_KMAPENT */
 
-
-#ifdef _KERNEL
-boolean_t       vm_map_check_protection __P((vm_map_t,
-                   vaddr_t, vaddr_t, vm_prot_t));
-int             vm_map_copy __P((vm_map_t, vm_map_t, vaddr_t,
-                   vsize_t, vaddr_t, boolean_t, boolean_t));
-void            vm_map_copy_entry __P((vm_map_t,
-                   vm_map_t, vm_map_entry_t, vm_map_entry_t));
-struct pmap;
-vm_map_t        vm_map_create __P((struct pmap *,
-                   vaddr_t, vaddr_t, boolean_t));
-void            vm_map_deallocate __P((vm_map_t));
-int             vm_map_delete __P((vm_map_t, vaddr_t, vaddr_t));
-vm_map_entry_t  vm_map_entry_create __P((vm_map_t));
-void            vm_map_entry_delete __P((vm_map_t, vm_map_entry_t));
-void            vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t));
-void            vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t));
-int             vm_map_find __P((vm_map_t, vm_object_t,
-                   vaddr_t, vaddr_t *, vsize_t, boolean_t));
-int             vm_map_findspace __P((vm_map_t,
-                   vaddr_t, vsize_t, vaddr_t *));
-int             vm_map_inherit __P((vm_map_t,
-                   vaddr_t, vaddr_t, vm_inherit_t));
-void            vm_map_init __P((struct vm_map *,
-                   vaddr_t, vaddr_t, boolean_t));
-int             vm_map_insert __P((vm_map_t,
-                   vm_object_t, vaddr_t, vaddr_t, vaddr_t));
-int             vm_map_lookup __P((vm_map_t *, vaddr_t, vm_prot_t,
-                   vm_map_entry_t *, vm_object_t *, vaddr_t *, vm_prot_t *,
-                   boolean_t *, boolean_t *));
-void            vm_map_lookup_done __P((vm_map_t, vm_map_entry_t));
-boolean_t       vm_map_lookup_entry __P((vm_map_t,
-                   vaddr_t, vm_map_entry_t *));
-int             vm_map_pageable __P((vm_map_t,
-                   vaddr_t, vaddr_t, boolean_t));
-int             vm_map_clean __P((vm_map_t,
-                   vaddr_t, vaddr_t, boolean_t, boolean_t));
-void            vm_map_print __P((vm_map_t, boolean_t));
-void            _vm_map_print __P((vm_map_t, boolean_t,
-                   void (*)(const char *, ...)));
-int             vm_map_protect __P((vm_map_t,
-                   vaddr_t, vaddr_t, vm_prot_t, boolean_t));
-void            vm_map_reference __P((vm_map_t));
-int             vm_map_remove __P((vm_map_t, vaddr_t, vaddr_t));
-void            vm_map_simplify __P((vm_map_t, vaddr_t));
-void            vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t));
-void            vm_map_startup __P((void));
-int             vm_map_submap __P((vm_map_t,
-                   vaddr_t, vaddr_t, vm_map_t));
-#endif
 #endif /* _VM_MAP_ */
diff -r e83788a72eca -r 1359a1deac52 sys/vm/vm_object.h
--- a/sys/vm/vm_object.h        Sat Apr 10 13:05:18 1999 +0000
+++ b/sys/vm/vm_object.h        Sat Apr 10 13:52:11 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_object.h,v 1.24 1998/08/13 02:11:08 eeh Exp $       */
+/*     $NetBSD: vm_object.h,v 1.25 1999/04/10 13:52:11 drochner Exp $  */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -74,162 +74,4 @@
 #include <vm/vm_page.h>
 #include <vm/vm_pager.h>
 
-/*
- *     Types defined:
- *
- *     vm_object_t             Virtual memory object.
- */
-
-struct vm_object {
-       struct pglist           memq;           /* Resident memory */
-       TAILQ_ENTRY(vm_object)  object_list;    /* list of all objects */
-       u_short                 flags;          /* see below */
-       u_short                 paging_in_progress; /* Paging (in or out) so
-                                                   don't collapse or destroy */
-       simple_lock_data_t      Lock;           /* Synchronization */
-       int                     ref_count;      /* How many refs?? */
-       vsize_t         size;           /* Object size */
-       int                     resident_page_count;
-                                               /* number of resident pages */
-       struct vm_object        *copy;          /* Object that holds copies of
-                                                  my changed pages */
-       vm_pager_t              pager;          /* Where to get data */
-       vaddr_t         paging_offset;  /* Offset into paging space */
-       struct vm_object        *shadow;        /* My shadow */
-       vaddr_t         shadow_offset;  /* Offset in shadow */
-       TAILQ_ENTRY(vm_object)  cached_list;    /* for persistence */
-       LIST_HEAD(, vm_object)  shadowers;      /* set of shadowers */
-       LIST_ENTRY(vm_object)   shadowers_list; /* link to next shadower of
-                                                  this object's shadow */
-};
-
-/*
- * Flags
- */
-#define OBJ_CANPERSIST 0x0001  /* allow to persist */
-#define OBJ_INTERNAL   0x0002  /* internally created object */
-#define OBJ_ACTIVE     0x0004  /* used to mark active objects */
-#define OBJ_FADING     0x0008  /* tell others that the object is going away */
-#define        OBJ_WAITING     0x8000  /* someone is waiting for paging to finish */
-
-TAILQ_HEAD(vm_object_hash_head, vm_object_hash_entry);
-
-struct vm_object_hash_entry {
-       TAILQ_ENTRY(vm_object_hash_entry)  hash_links;  /* hash chain links */
-       vm_object_t                        object;      /* object represented */
-};
-
-typedef struct vm_object_hash_entry    *vm_object_hash_entry_t;
-
-#ifdef _KERNEL
-TAILQ_HEAD(object_q, vm_object);
-
-struct object_q        vm_object_cached_list;  /* list of objects persisting */
-int            vm_object_cached;       /* size of cached list */
-simple_lock_data_t     vm_cache_lock;  /* lock for object cache */
-
-struct object_q        vm_object_list;         /* list of allocated objects */
-long           vm_object_count;        /* count of all objects */
-simple_lock_data_t     vm_object_list_lock;
-                                       /* lock for object list and count */
-
-vm_object_t    kernel_object;          /* the single kernel object */
-vm_object_t    kmem_object;
-
-#define        vm_object_cache_lock()          simple_lock(&vm_cache_lock)
-#define        vm_object_cache_unlock()        simple_unlock(&vm_cache_lock)
-#endif /* _KERNEL */
-
-#define        vm_object_lock_init(object)     simple_lock_init(&(object)->Lock)
-#define        vm_object_lock(object)          simple_lock(&(object)->Lock)
-#define        vm_object_unlock(object)        simple_unlock(&(object)->Lock)
-#define        vm_object_lock_try(object)      simple_lock_try(&(object)->Lock)
-
-#define        vm_object_sleep(event, object, interruptible, where) \
-       do {                                                            \
-               (object)->flags |= OBJ_WAITING;                         \
-               thread_sleep_msg((event), &(object)->Lock,              \
-                   (interruptible), (where), 0);                       \
-       } while (0)
-
-#define        vm_object_wakeup(object) \
-       do {                                                            \
-               if ((object)->flags & OBJ_WAITING) {                    \
-                       (object)->flags &= ~OBJ_WAITING;                \
-                       thread_wakeup((object));                        \
-               }                                                       \
-       } while (0)
-
-#define        vm_object_paging(object) \
-       ((object)->paging_in_progress != 0)
-
-#ifdef DIAGNOSTIC
-/* Hope 0xdead is an unlikely value of either field */
-#if BYTE_ORDER == BIG_ENDIAN
-#define __VMOBJECT_IS_DEAD(object) \
-       ((object)->flags == 0xdead)
-#else
-#define __VMOBJECT_IS_DEAD(object) \
-       ((object)->paging_in_progress == 0xdead)
-#endif /* BIG_ENDIAN */
-#else
-#define __VMOBJECT_IS_DEAD(object)     (0)
-#endif /* DIAGNOSTIC */
-
-#define        vm_object_paging_begin(object) \
-       do {                                                            \
-               if (__VMOBJECT_IS_DEAD(object))                         \
-                       panic("vm_object_paging_begin");                \
-               (object)->paging_in_progress++;                         \
-       } while (0)
-
-#define        vm_object_paging_end(object) \
-       do {                                                            \
-               if (--((object)->paging_in_progress) == 0)              \
-                       vm_object_wakeup((object));                     \
-       } while (0)
-
-#define        vm_object_paging_wait(object,msg) \
-       do {                                                            \
-               while (vm_object_paging((object))) {                    \
-                       vm_object_sleep((object), (object), FALSE,      \
-                           (msg));                                     \
-                       vm_object_lock((object));                       \
-               }                                                       \
-       } while (0)
-
-#ifdef _KERNEL
-vm_object_t     vm_object_allocate __P((vsize_t));
-void            vm_object_cache_clear __P((void));
-void            vm_object_cache_trim __P((void));
-boolean_t       vm_object_coalesce __P((vm_object_t, vm_object_t,



Home | Main Index | Thread Index | Old Index