diff options
author | peter <peter@FreeBSD.org> | 2000-07-28 22:03:08 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-07-28 22:03:08 +0000 |
commit | 441c016268f3d71b90aec79b082ed2ad88f0deae (patch) | |
tree | 6938e491e8093ca63a6bc567d82a710c183d209a /sys/vm | |
parent | 2a6373ea6100a0c555441274b6b073f58c74af3f (diff) | |
download | FreeBSD-src-441c016268f3d71b90aec79b082ed2ad88f0deae.zip FreeBSD-src-441c016268f3d71b90aec79b082ed2ad88f0deae.tar.gz |
Minor cleanups:
- remove unused variables (fix warnings)
- use a more consistant ansi style rather than a mixture
- remove dead #if 0 code and declarations
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/phys_pager.c | 63 | ||||
-rw-r--r-- | sys/vm/vm_object.h | 11 |
2 files changed, 19 insertions, 55 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 586844f..f2980db 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -38,34 +38,15 @@ #include <vm/vm_pager.h> #include <vm/vm_zone.h> -static void phys_pager_init __P((void)); -static vm_object_t phys_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t, - vm_ooffset_t)); -static void phys_pager_dealloc __P((vm_object_t)); -static int phys_pager_getpages __P((vm_object_t, vm_page_t *, int, int)); -static void phys_pager_putpages __P((vm_object_t, vm_page_t *, int, - boolean_t, int *)); -static boolean_t phys_pager_haspage __P((vm_object_t, vm_pindex_t, int *, - int *)); - /* list of device pager objects */ static struct pagerlst phys_pager_object_list; static int phys_pager_alloc_lock, phys_pager_alloc_lock_want; -struct pagerops physpagerops = { - phys_pager_init, - phys_pager_alloc, - phys_pager_dealloc, - phys_pager_getpages, - phys_pager_putpages, - phys_pager_haspage, - NULL -}; - static void -phys_pager_init() +phys_pager_init(void) { + TAILQ_INIT(&phys_pager_object_list); } @@ -104,9 +85,6 @@ phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, object = vm_object_allocate(OBJT_PHYS, OFF_TO_IDX(foff + size)); object->handle = handle; -#if 0 - TAILQ_INIT(&object->un_pager.physp.physp_pglist); -#endif TAILQ_INSERT_TAIL(&phys_pager_object_list, object, pager_object_list); } else { @@ -126,21 +104,14 @@ phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, } static void -phys_pager_dealloc(object) - vm_object_t object; +phys_pager_dealloc(vm_object_t object) { - vm_page_t m; - int s; TAILQ_REMOVE(&phys_pager_object_list, object, pager_object_list); } static int -phys_pager_getpages(object, m, count, reqpage) - vm_object_t object; - vm_page_t *m; - int count; - int reqpage; +phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) { int i, s; @@ -168,13 +139,10 @@ phys_pager_getpages(object, m, count, reqpage) } static void -phys_pager_putpages(object, m, count, sync, rtvals) - vm_object_t object; - vm_page_t *m; - int count; - boolean_t sync; - int *rtvals; +phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t sync, + int *rtvals) { + panic("phys_pager_putpage called"); } @@ -189,11 +157,8 @@ phys_pager_putpages(object, m, count, sync, rtvals) #define PHYSCLUSTER 1024 #endif static boolean_t -phys_pager_haspage(object, pindex, before, after) - vm_object_t object; - vm_pindex_t pindex; - int *before; - int *after; +phys_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, + int *after) { vm_pindex_t base, end; @@ -205,3 +170,13 @@ phys_pager_haspage(object, pindex, before, after) *after = end - pindex; return (TRUE); } + +struct pagerops physpagerops = { + phys_pager_init, + phys_pager_alloc, + phys_pager_dealloc, + phys_pager_getpages, + phys_pager_putpages, + phys_pager_haspage, + NULL +}; diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index c9f239c..881cffe 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -123,17 +123,6 @@ struct vm_object { TAILQ_HEAD(, vm_page) devp_pglist; } devp; -#if 0 - /* - * Physmem pager - * - * physp_pglist - list of allocated pages - */ - struct { - TAILQ_HEAD(, vm_page) physp_pglist; - } physp; -#endif - /* * Swap pager * |