diff options
author | phk <phk@FreeBSD.org> | 1995-12-14 09:55:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-12-14 09:55:16 +0000 |
commit | 9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e (patch) | |
tree | 9887f4bf5939f3591e9b3a4f6e1865f9a1f810d8 /sys/vm | |
parent | 63ec2c0ae9b44c5394bae5d6ee7fea5be9659585 (diff) | |
download | FreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.zip FreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.tar.gz |
Another mega commit to staticize things.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/default_pager.c | 20 | ||||
-rw-r--r-- | sys/vm/default_pager.h | 7 | ||||
-rw-r--r-- | sys/vm/device_pager.c | 31 | ||||
-rw-r--r-- | sys/vm/device_pager.h | 8 | ||||
-rw-r--r-- | sys/vm/swap_pager.c | 38 | ||||
-rw-r--r-- | sys/vm/swap_pager.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_extern.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_glue.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 31 | ||||
-rw-r--r-- | sys/vm/vm_map.h | 8 | ||||
-rw-r--r-- | sys/vm/vm_meter.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 40 | ||||
-rw-r--r-- | sys/vm/vm_object.h | 5 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 23 | ||||
-rw-r--r-- | sys/vm/vm_pageout.c | 8 | ||||
-rw-r--r-- | sys/vm/vm_pager.c | 7 | ||||
-rw-r--r-- | sys/vm/vm_swap.c | 6 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 32 | ||||
-rw-r--r-- | sys/vm/vnode_pager.h | 8 |
19 files changed, 159 insertions, 133 deletions
diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index 91cc8a7..f61439b 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: default_pager.c,v 1.3 1995/12/07 12:48:00 davidg Exp $ + * $Id: default_pager.c,v 1.4 1995/12/11 04:57:56 dyson Exp $ */ #include <sys/param.h> @@ -46,6 +46,14 @@ #include <vm/default_pager.h> #include <vm/swap_pager.h> +static vm_object_t default_pager_alloc __P((void *, vm_size_t, vm_prot_t, + vm_ooffset_t)); +static void default_pager_dealloc __P((vm_object_t)); +static int default_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); +static int default_pager_putpages __P((vm_object_t, vm_page_t *, int, + boolean_t, int *)); +static boolean_t default_pager_haspage __P((vm_object_t, vm_pindex_t, int *, + int *)); /* * pagerops for OBJT_DEFAULT - "default pager". */ @@ -62,7 +70,7 @@ struct pagerops defaultpagerops = { /* * no_pager_alloc just returns an initialized object. */ -vm_object_t +static vm_object_t default_pager_alloc(handle, size, prot, offset) void *handle; register vm_size_t size; @@ -75,7 +83,7 @@ default_pager_alloc(handle, size, prot, offset) return vm_object_allocate(OBJT_DEFAULT, offset + size); } -void +static void default_pager_dealloc(object) vm_object_t object; { @@ -88,7 +96,7 @@ default_pager_dealloc(object) * The default pager has no backing store, so we always return * failure. */ -int +static int default_pager_getpages(object, m, count, reqpage) vm_object_t object; vm_page_t *m; @@ -98,7 +106,7 @@ default_pager_getpages(object, m, count, reqpage) return VM_PAGER_FAIL; } -int +static int default_pager_putpages(object, m, c, sync, rtvals) vm_object_t object; vm_page_t *m; @@ -126,7 +134,7 @@ default_pager_putpages(object, m, c, sync, rtvals) return swap_pager_putpages(object, m, c, sync, rtvals); } -boolean_t +static boolean_t default_pager_haspage(object, pindex, before, after) vm_object_t object; vm_pindex_t pindex; diff --git a/sys/vm/default_pager.h b/sys/vm/default_pager.h index 54ada64..675fe73 100644 --- a/sys/vm/default_pager.h +++ b/sys/vm/default_pager.h @@ -28,16 +28,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: default_pager.h,v 1.1 1995/07/13 10:15:03 davidg Exp $ + * $Id: default_pager.h,v 1.2 1995/12/11 04:57:58 dyson Exp $ */ #ifndef _DEFAULT_PAGER_H_ #define _DEFAULT_PAGER_H_ 1 -vm_object_t default_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t)); -void default_pager_dealloc __P((vm_object_t)); -int default_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); -int default_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *)); -boolean_t default_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *)); #endif /* _DEFAULT_PAGER_H_ */ diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index eaa848a..63201de 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)device_pager.c 8.1 (Berkeley) 6/11/93 - * $Id: device_pager.c,v 1.17 1995/12/11 04:57:59 dyson Exp $ + * $Id: device_pager.c,v 1.18 1995/12/13 15:13:54 julian Exp $ */ #include <sys/param.h> @@ -56,8 +56,21 @@ #include <vm/vm_pager.h> #include <vm/device_pager.h> -struct pagerlst dev_pager_object_list; /* list of device pager objects */ -TAILQ_HEAD(, vm_page) dev_pager_fakelist; /* list of available vm_page_t's */ +static void dev_pager_init __P((void)); +static vm_object_t dev_pager_alloc __P((void *, vm_size_t, vm_prot_t, + vm_ooffset_t)); +static void dev_pager_dealloc __P((vm_object_t)); +static int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); +static int dev_pager_putpages __P((vm_object_t, vm_page_t *, int, + boolean_t, int *)); +static boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *, + int *)); + +/* list of device pager objects */ +static struct pagerlst dev_pager_object_list; + +/* list of available vm_page_t's */ +static TAILQ_HEAD(, vm_page) dev_pager_fakelist; static vm_page_t dev_pager_getfake __P((vm_offset_t)); static void dev_pager_putfake __P((vm_page_t)); @@ -74,14 +87,14 @@ struct pagerops devicepagerops = { NULL }; -void +static void dev_pager_init() { TAILQ_INIT(&dev_pager_object_list); TAILQ_INIT(&dev_pager_fakelist); } -vm_object_t +static vm_object_t dev_pager_alloc(handle, size, prot, foff) void *handle; vm_size_t size; @@ -159,7 +172,7 @@ dev_pager_alloc(handle, size, prot, foff) return (object); } -void +static void dev_pager_dealloc(object) vm_object_t object; { @@ -175,7 +188,7 @@ dev_pager_dealloc(object) } } -int +static int dev_pager_getpages(object, m, count, reqpage) vm_object_t object; vm_page_t *m; @@ -220,7 +233,7 @@ dev_pager_getpages(object, m, count, reqpage) return (VM_PAGER_OK); } -int +static int dev_pager_putpages(object, m, count, sync, rtvals) vm_object_t object; vm_page_t *m; @@ -231,7 +244,7 @@ dev_pager_putpages(object, m, count, sync, rtvals) panic("dev_pager_putpage called"); } -boolean_t +static boolean_t dev_pager_haspage(object, pindex, before, after) vm_object_t object; vm_pindex_t pindex; diff --git a/sys/vm/device_pager.h b/sys/vm/device_pager.h index 41dc328..ac242bd 100644 --- a/sys/vm/device_pager.h +++ b/sys/vm/device_pager.h @@ -36,17 +36,11 @@ * SUCH DAMAGE. * * @(#)device_pager.h 8.3 (Berkeley) 12/13/93 - * $Id: device_pager.h,v 1.4 1995/07/13 08:48:11 davidg Exp $ + * $Id: device_pager.h,v 1.5 1995/12/11 04:58:00 dyson Exp $ */ #ifndef _DEVICE_PAGER_ #define _DEVICE_PAGER_ 1 -void dev_pager_init __P((void)); -vm_object_t dev_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t)); -void dev_pager_dealloc __P((vm_object_t)); -int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); -int dev_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *)); -boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *)); #endif /* _DEVICE_PAGER_ */ diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 0105e79..5bc992a 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$ * * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94 - * $Id: swap_pager.c,v 1.55 1995/12/11 15:43:33 dyson Exp $ + * $Id: swap_pager.c,v 1.56 1995/12/14 08:32:45 phk Exp $ */ /* @@ -76,12 +76,11 @@ #define NPENDINGIO 10 #endif -int nswiodone; +static int nswiodone; int swap_pager_full; extern int vm_swap_size; static int no_swap_space = 1; struct rlist *swaplist; -int nswaplist; #define MAX_PAGEOUT_CLUSTER 16 @@ -89,7 +88,7 @@ TAILQ_HEAD(swpclean, swpagerclean); typedef struct swpagerclean *swp_clean_t; -struct swpagerclean { +static struct swpagerclean { TAILQ_ENTRY(swpagerclean) spc_list; int spc_flags; struct buf *spc_bp; @@ -105,15 +104,24 @@ struct swpagerclean { #define SWB_EMPTY (-1) -struct swpclean swap_pager_done; /* list of completed page cleans */ -struct swpclean swap_pager_inuse; /* list of pending page cleans */ -struct swpclean swap_pager_free; /* list of free pager clean structs */ -struct pagerlst swap_pager_object_list; /* list of "named" anon region objects */ -struct pagerlst swap_pager_un_object_list; /* list of "unnamed" anon region objects */ +/* list of completed page cleans */ +static struct swpclean swap_pager_done; + +/* list of pending page cleans */ +static struct swpclean swap_pager_inuse; + +/* list of free pager clean structs */ +static struct swpclean swap_pager_free; + +/* list of "named" anon region objects */ +static struct pagerlst swap_pager_object_list; + +/* list of "unnamed" anon region objects */ +struct pagerlst swap_pager_un_object_list; #define SWAP_FREE_NEEDED 0x1 /* need a swap block */ #define SWAP_FREE_NEEDED_BY_PAGEOUT 0x2 -int swap_pager_needflags; +static int swap_pager_needflags; static struct pagerlst *swp_qs[] = { &swap_pager_object_list, &swap_pager_un_object_list, (struct pagerlst *) 0 @@ -129,7 +137,10 @@ static void swap_pager_dealloc __P((vm_object_t object)); static boolean_t swap_pager_haspage __P((vm_object_t object, vm_pindex_t pindex, int *before, int *after)); +static int swap_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); static void swap_pager_init __P((void)); +static void swap_pager_sync __P((void)); + struct pagerops swappagerops = { swap_pager_init, swap_pager_alloc, @@ -141,7 +152,8 @@ struct pagerops swappagerops = { }; static int npendingio = NPENDINGIO; -int dmmin, dmmax; +static int dmmin; +int dmmax; static __pure int swap_pager_block_index __P((vm_offset_t offset)) __pure2; @@ -832,7 +844,7 @@ swap_pager_iodone1(bp) wakeup(bp); } -int +static int swap_pager_getpages(object, m, count, reqpage) vm_object_t object; vm_page_t *m; @@ -1451,7 +1463,7 @@ swap_pager_putpages(object, m, count, sync, rtvals) return (rv); } -void +static void swap_pager_sync() { register swp_clean_t spc, tspc; diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h index cf6b911..c20d967 100644 --- a/sys/vm/swap_pager.h +++ b/sys/vm/swap_pager.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 - * $Id: swap_pager.h,v 1.11 1995/11/16 09:51:22 bde Exp $ + * $Id: swap_pager.h,v 1.12 1995/12/11 04:58:03 dyson Exp $ */ /* @@ -67,9 +67,7 @@ typedef struct swblock *sw_blk_t; extern struct pagerlst swap_pager_un_object_list; extern int swap_pager_full; -int swap_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); int swap_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *)); -void swap_pager_sync __P((void)); int swap_pager_swp_alloc __P((vm_object_t, int)); void swap_pager_copy __P((vm_object_t, vm_pindex_t, vm_object_t, vm_pindex_t, vm_pindex_t)); diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 693a548..38b41c4 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 - * $Id: vm_extern.h,v 1.20 1995/12/07 12:48:08 davidg Exp $ + * $Id: vm_extern.h,v 1.21 1995/12/11 04:58:04 dyson Exp $ */ #ifndef _VM_EXTERN_H_ @@ -82,9 +82,7 @@ vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, b void munmapfd __P((struct proc *, int)); int pager_cache __P((vm_object_t, boolean_t)); int swaponvp __P((struct proc *, struct vnode *, dev_t , u_long)); -void swapout __P((struct proc *)); void swapout_procs __P((void)); -void swstrategy __P((struct buf *)); int useracc __P((caddr_t, int, int)); int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t)); void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t)); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 90dee12..e6e0ffc 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -59,7 +59,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_glue.c,v 1.31 1995/12/02 17:11:18 bde Exp $ + * $Id: vm_glue.c,v 1.32 1995/12/07 12:48:11 davidg Exp $ */ #include <sys/param.h> @@ -108,6 +108,8 @@ static void scheduler __P((void *)); SYSINIT(scheduler, SI_SUB_RUN_SCHEDULER, SI_ORDER_FIRST, scheduler, NULL) +static void swapout __P((struct proc *)); + extern char kstack[]; /* vm_map_t upages_map; */ @@ -505,7 +507,7 @@ retry: wakeup(&proc0); } -void +static void swapout(p) register struct proc *p; { diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index f6f0efe..d7a6dfc 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.28 1995/12/07 12:48:15 davidg Exp $ + * $Id: vm_map.c,v 1.29 1995/12/11 04:58:12 dyson Exp $ */ /* @@ -148,15 +148,24 @@ vm_offset_t kentry_data; vm_size_t kentry_data_size; -vm_map_entry_t kentry_free; -vm_map_t kmap_free; +static vm_map_entry_t kentry_free; +static vm_map_t kmap_free; -int kentry_count; +static int kentry_count; static vm_offset_t mapvm_start, mapvm, mapvmmax; static int mapvmpgcnt; static void _vm_map_clip_end __P((vm_map_t, vm_map_entry_t, vm_offset_t)); static void _vm_map_clip_start __P((vm_map_t, vm_map_entry_t, vm_offset_t)); +static vm_map_entry_t vm_map_entry_create __P((vm_map_t)); +static void vm_map_entry_delete __P((vm_map_t, vm_map_entry_t)); +static void vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t)); +static void vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t)); +static void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, + vm_map_entry_t)); +#ifdef notyet +static void vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t)); +#endif void vm_map_startup() @@ -311,7 +320,7 @@ vm_map_init(map, min, max, pageable) static struct vm_map_entry *mappool; static int mappoolcnt; -vm_map_entry_t +static vm_map_entry_t vm_map_entry_create(map) vm_map_t map; { @@ -388,7 +397,7 @@ vm_map_entry_create(map) * * Inverse of vm_map_entry_create. */ -void +static void vm_map_entry_dispose(map, entry) vm_map_t map; vm_map_entry_t entry; @@ -795,6 +804,7 @@ vm_map_find(map, object, offset, addr, length, find_space) return (result); } +#ifdef notyet /* * vm_map_simplify_entry: [ internal use only ] * @@ -802,7 +812,7 @@ vm_map_find(map, object, offset, addr, length, find_space) * removing extra sharing maps * [XXX maybe later] merging with a neighbor */ -void +static void vm_map_simplify_entry(map, entry) vm_map_t map; vm_map_entry_t entry; @@ -853,6 +863,7 @@ vm_map_simplify_entry(map, entry) */ } } +#endif /* * vm_map_clip_start: [ internal use only ] @@ -1524,7 +1535,7 @@ vm_map_clean(map, start, end, syncio, invalidate) * The map in question should be locked. * [This is the reason for this routine's existence.] */ -void +static void vm_map_entry_unwire(map, entry) vm_map_t map; register vm_map_entry_t entry; @@ -1538,7 +1549,7 @@ vm_map_entry_unwire(map, entry) * * Deallocate the given entry from the target map. */ -void +static void vm_map_entry_delete(map, entry) register vm_map_t map; register vm_map_entry_t entry; @@ -1735,7 +1746,7 @@ vm_map_check_protection(map, start, end, protection) * Copies the contents of the source entry to the destination * entry. The entries *must* be aligned properly. */ -void +static void vm_map_copy_entry(src_map, dst_map, src_entry, dst_entry) vm_map_t src_map, dst_map; register vm_map_entry_t src_entry, dst_entry; diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 25e7fa3..93cb5ec 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.h,v 1.8 1995/12/07 12:48:17 davidg Exp $ + * $Id: vm_map.h,v 1.9 1995/12/11 04:58:14 dyson Exp $ */ /* @@ -208,15 +208,10 @@ extern vm_size_t kentry_data_size; boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t)); int vm_map_copy __P((vm_map_t, vm_map_t, vm_offset_t, vm_size_t, vm_offset_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 *, vm_offset_t, vm_offset_t, boolean_t)); void vm_map_deallocate __P((vm_map_t)); int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_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, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t)); int vm_map_findspace __P((vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *)); int vm_map_inherit __P((vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t)); @@ -232,7 +227,6 @@ int vm_map_protect __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t void vm_map_reference __P((vm_map_t)); int vm_map_remove __P((vm_map_t, vm_offset_t, vm_offset_t)); void vm_map_simplify __P((vm_map_t, vm_offset_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, vm_offset_t, vm_offset_t, vm_map_t)); diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 7769138..5a2f4db3 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94 - * $Id: vm_meter.c,v 1.11 1995/12/07 12:48:18 davidg Exp $ + * $Id: vm_meter.c,v 1.12 1995/12/10 14:52:10 bde Exp $ */ #include <sys/param.h> @@ -56,13 +56,13 @@ struct loadavg averunnable = struct vmmeter cnt; -int maxslp = MAXSLP; +static int maxslp = MAXSLP; /* * Constants for averages over 1, 5, and 15 minutes * when sampling at 5 second intervals. */ -fixpt_t cexp[3] = { +static fixpt_t cexp[3] = { 0.9200444146293232 * FSCALE, /* exp(-1/12) */ 0.9834714538216174 * FSCALE, /* exp(-1/60) */ 0.9944598480048967 * FSCALE, /* exp(-1/180) */ diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index aef215f..7d14fb0 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.58 1995/12/07 12:48:21 davidg Exp $ + * $Id: vm_object.c,v 1.59 1995/12/11 04:58:20 dyson Exp $ */ /* @@ -92,7 +92,7 @@ #include <vm/vm_extern.h> #ifdef DDB -extern void vm_object_check __P((void)); +static void DDB_vm_object_check __P((void)); #endif static void _vm_object_allocate __P((objtype_t, vm_size_t, vm_object_t)); @@ -101,10 +101,12 @@ static int _vm_object_in_map __P((vm_map_t map, vm_object_t object, vm_map_entry_t entry)); static int vm_object_in_map __P((vm_object_t object)); #endif -static vm_page_t - vm_object_page_lookup __P((vm_object_t object, - vm_offset_t offset)); static void vm_object_qcollapse __P((vm_object_t object)); +#ifdef not_used +static void vm_object_deactivate_pages __P((vm_object_t)); +#endif +static void vm_object_terminate __P((vm_object_t)); +static void vm_object_cache_trim __P((void)); /* * Virtual memory objects maintain the actual data @@ -134,17 +136,17 @@ static void vm_object_qcollapse __P((vm_object_t object)); int vm_object_cache_max; struct object_q vm_object_cached_list; -int vm_object_cached; +static int vm_object_cached; struct object_q vm_object_list; -long vm_object_count; +static long vm_object_count; vm_object_t kernel_object; vm_object_t kmem_object; -struct vm_object kernel_object_store; -struct vm_object kmem_object_store; +static struct vm_object kernel_object_store; +static struct vm_object kmem_object_store; extern int vm_pageout_page_count; -long object_collapses; -long object_bypasses; +static long object_collapses; +static long object_bypasses; static void _vm_object_allocate(type, size, object) @@ -359,7 +361,7 @@ vm_object_deallocate(object) * * The object must be locked. */ -void +static void vm_object_terminate(object) register vm_object_t object; { @@ -531,6 +533,8 @@ relookup: return; } +#ifdef not_used +/* XXX I cannot tell if this should be an exported symbol */ /* * vm_object_deactivate_pages * @@ -539,7 +543,7 @@ relookup: * * The object must be locked. */ -void +static void vm_object_deactivate_pages(object) register vm_object_t object; { @@ -550,11 +554,12 @@ vm_object_deactivate_pages(object) vm_page_deactivate(p); } } +#endif /* * Trim the object cache to size. */ -void +static void vm_object_cache_trim() { register vm_object_t object; @@ -1304,8 +1309,10 @@ vm_object_in_map( object) } -void -vm_object_check() { +#ifdef DDB +static void +DDB_vm_object_check() +{ vm_object_t object; /* @@ -1330,6 +1337,7 @@ vm_object_check() { } } } +#endif /* DDB */ /* * vm_object_print: [ debug ] diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 125649a..6226b8d 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.h,v 1.24 1995/12/07 12:48:22 davidg Exp $ + * $Id: vm_object.h,v 1.25 1995/12/11 04:58:23 dyson Exp $ */ /* @@ -163,11 +163,9 @@ vm_object_pip_wakeup(vm_object_t object) vm_object_t vm_object_allocate __P((objtype_t, vm_size_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_pindex_t, vm_size_t, vm_size_t)); void vm_object_collapse __P((vm_object_t)); void vm_object_copy __P((vm_object_t, vm_pindex_t, vm_object_t *, vm_pindex_t *, boolean_t *)); -void vm_object_deactivate_pages __P((vm_object_t)); void vm_object_deallocate __P((vm_object_t)); void vm_object_init __P((void)); void vm_object_page_clean __P((vm_object_t, vm_pindex_t, vm_pindex_t, boolean_t, boolean_t)); @@ -176,7 +174,6 @@ void vm_object_pmap_copy __P((vm_object_t, vm_pindex_t, vm_pindex_t)); void vm_object_pmap_remove __P((vm_object_t, vm_pindex_t, vm_pindex_t)); void vm_object_reference __P((vm_object_t)); void vm_object_shadow __P((vm_object_t *, vm_ooffset_t *, vm_size_t)); -void vm_object_terminate __P((vm_object_t)); #endif /* KERNEL */ #endif /* _VM_OBJECT_ */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 081c262..4823730 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.41 1995/12/11 04:58:25 dyson Exp $ + * $Id: vm_page.c,v 1.42 1995/12/11 15:41:50 dyson Exp $ */ /* @@ -86,7 +86,7 @@ #include <vm/vm_extern.h> #ifdef DDB -extern void print_page_info __P((void)); +extern void DDB_print_page_info __P((void)); #endif /* @@ -94,8 +94,8 @@ extern void print_page_info __P((void)); * page structure. */ -struct pglist *vm_page_buckets; /* Array of buckets */ -int vm_page_bucket_count; /* How big is array? */ +static struct pglist *vm_page_buckets; /* Array of buckets */ +static int vm_page_bucket_count; /* How big is array? */ static int vm_page_hash_mask; /* Mask for hash function */ struct pglist vm_page_queue_free; @@ -104,17 +104,12 @@ struct pglist vm_page_queue_active; struct pglist vm_page_queue_inactive; struct pglist vm_page_queue_cache; -/* has physical page allocation been initialized? */ -boolean_t vm_page_startup_initialized; - vm_page_t vm_page_array; -int vm_page_array_size; +static int vm_page_array_size; long first_page; -long last_page; -vm_offset_t first_phys_addr; -vm_offset_t last_phys_addr; -vm_size_t page_mask; -int page_shift; +static long last_page; +static vm_size_t page_mask; +static int page_shift; int vm_page_zero_count; /* @@ -1123,7 +1118,7 @@ vm_page_test_dirty(m) #ifdef DDB void -print_page_info(void) +DDB_print_page_info(void) { printf("cnt.v_free_count: %d\n", cnt.v_free_count); printf("cnt.v_cache_count: %d\n", cnt.v_cache_count); diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 9e96afc..7946335 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.61 1995/12/07 12:48:24 davidg Exp $ + * $Id: vm_pageout.c,v 1.62 1995/12/11 04:58:28 dyson Exp $ */ /* @@ -115,7 +115,7 @@ SYSINIT_KT(pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_FIRST, kproc_start, &page_k /* the kernel process "vm_daemon"*/ static void vm_daemon __P((void)); -struct proc *vmproc; +static struct proc *vmproc; static struct kproc_desc vm_kp = { "vmdaemon", @@ -130,8 +130,8 @@ int vm_pages_needed; /* Event on which pageout daemon sleeps */ int vm_pageout_pages_needed; /* flag saying that the pageout daemon needs pages */ extern int npendingio; -int vm_pageout_req_swapout; /* XXX */ -int vm_daemon_needed; +static int vm_pageout_req_swapout; /* XXX */ +static int vm_daemon_needed; extern int nswiodone; extern int vm_swap_size; extern int vfs_update_wakeup; diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index b6a30e5..aa3839d 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pager.c,v 1.19 1995/12/07 12:48:26 davidg Exp $ + * $Id: vm_pager.c,v 1.20 1995/12/11 04:58:29 dyson Exp $ */ /* @@ -110,9 +110,8 @@ static int npagers = sizeof(pagertab) / sizeof(pagertab[0]); int pager_map_size = PAGER_MAP_SIZE; vm_map_t pager_map; -boolean_t pager_map_wanted; -int bswneeded; -vm_offset_t swapbkva; /* swap buffers kva */ +static int bswneeded; +static vm_offset_t swapbkva; /* swap buffers kva */ void vm_pager_init() diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index 7a2c53a..6128f64 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_swap.c 8.5 (Berkeley) 2/17/94 - * $Id: vm_swap.c,v 1.31 1995/12/10 19:53:42 bde Exp $ + * $Id: vm_swap.c,v 1.32 1995/12/13 15:13:57 julian Exp $ */ #include <sys/param.h> @@ -52,6 +52,7 @@ #include <miscfs/specfs/specdev.h> +static void swstrategy __P((struct buf *)); #define CDEV_MAJOR 4 #define BDEV_MAJOR 1 @@ -76,11 +77,12 @@ static struct cdevsw sw_cdevsw = static struct swdevt should_be_malloced[NSWAPDEV]; static struct swdevt *swdevt = should_be_malloced; struct vnode *swapdev_vp; +/* XXX swapinfo(8) needs this one I belive */ int nswap; /* first block after the interleaved devs */ static int nswdev = NSWAPDEV; int vm_swap_size; -void +static void swstrategy(bp) register struct buf *bp; { diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 1427235..8223df5 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91 - * $Id: vnode_pager.c,v 1.54 1995/12/07 12:48:31 davidg Exp $ + * $Id: vnode_pager.c,v 1.55 1995/12/11 04:58:32 dyson Exp $ */ /* @@ -71,11 +71,15 @@ #include <vm/vnode_pager.h> #include <vm/vm_extern.h> -extern vm_offset_t vnode_pager_addr __P((struct vnode *vp, vm_ooffset_t address, +static vm_offset_t vnode_pager_addr __P((struct vnode *vp, vm_ooffset_t address, int *run)); -extern void vnode_pager_iodone __P((struct buf *bp)); -extern int vnode_pager_input_smlfs __P((vm_object_t object, vm_page_t m)); -extern int vnode_pager_input_old __P((vm_object_t object, vm_page_t m)); +static void vnode_pager_iodone __P((struct buf *bp)); +static int vnode_pager_input_smlfs __P((vm_object_t object, vm_page_t m)); +static int vnode_pager_input_old __P((vm_object_t object, vm_page_t m)); +static void vnode_pager_dealloc __P((vm_object_t)); +static int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); +static int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *)); +static boolean_t vnode_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *)); struct pagerops vnodepagerops = { NULL, @@ -167,7 +171,7 @@ vnode_pager_alloc(handle, size, prot, offset) return (object); } -void +static void vnode_pager_dealloc(object) vm_object_t object; { @@ -193,7 +197,7 @@ vnode_pager_dealloc(object) vrele(vp); } -boolean_t +static boolean_t vnode_pager_haspage(object, pindex, before, after) vm_object_t object; vm_pindex_t pindex; @@ -370,7 +374,7 @@ vnode_pager_freepage(m) * calculate the linear (byte) disk address of specified virtual * file address */ -vm_offset_t +static vm_offset_t vnode_pager_addr(vp, address, run) struct vnode *vp; vm_ooffset_t address; @@ -413,7 +417,7 @@ vnode_pager_addr(vp, address, run) /* * interrupt routine for I/O completion */ -void +static void vnode_pager_iodone(bp) struct buf *bp; { @@ -424,7 +428,7 @@ vnode_pager_iodone(bp) /* * small block file system vnode pager input */ -int +static int vnode_pager_input_smlfs(object, m) vm_object_t object; vm_page_t m; @@ -514,7 +518,7 @@ vnode_pager_input_smlfs(object, m) /* * old style vnode pager output routine */ -int +static int vnode_pager_input_old(object, m) vm_object_t object; vm_page_t m; @@ -574,7 +578,7 @@ vnode_pager_input_old(object, m) * generic vnode pager input routine */ -int +static int vnode_pager_getpages(object, m, count, reqpage) vm_object_t object; vm_page_t *m; @@ -816,7 +820,7 @@ vnode_pager_leaf_getpages(object, m, count, reqpage) return (error ? VM_PAGER_ERROR : VM_PAGER_OK); } -int +static int vnode_pager_putpages(object, m, count, sync, rtvals) vm_object_t object; vm_page_t *m; @@ -911,7 +915,7 @@ vnode_pager_leaf_putpages(object, m, count, sync, rtvals) printf("vnode_pager_putpages: I/O error %d\n", error); } if (auio.uio_resid) { - printf("vnode_pager_putpages: residual I/O %d at %d\n", + printf("vnode_pager_putpages: residual I/O %d at %ld\n", auio.uio_resid, m[0]->pindex); } for (i = 0; i < count; i++) { diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h index c17074c..d0834b9 100644 --- a/sys/vm/vnode_pager.h +++ b/sys/vm/vnode_pager.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93 - * $Id: vnode_pager.h,v 1.6 1995/09/06 05:37:43 dyson Exp $ + * $Id: vnode_pager.h,v 1.7 1995/12/11 04:58:34 dyson Exp $ */ #ifndef _VNODE_PAGER_ @@ -44,12 +44,8 @@ #ifdef KERNEL vm_object_t vnode_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t)); -void vnode_pager_dealloc __P((vm_object_t)); -int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); -int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *)); -boolean_t vnode_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *)); -struct vnode *vnode_pager_lock __P((vm_object_t)); void vnode_pager_freepage __P((vm_page_t m)); +struct vnode *vnode_pager_lock __P((vm_object_t)); #endif #endif /* _VNODE_PAGER_ */ |