From 1cec66db340b5071320225ab7544cf7d5891842f Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Fri, 20 Mar 2009 15:19:05 +0000 Subject: While working on some stuff in uvm I've gotten REALLY sick of reading K&R function declarations, so switch them all over to ansi-style, in accordance with the prophesy. "go for it" art@ --- sys/uvm/uvm_amap_i.h | 36 ++++++---------------- sys/uvm/uvm_anon.c | 18 +++++------ sys/uvm/uvm_aobj.c | 83 ++++++++++++++++--------------------------------- sys/uvm/uvm_device.c | 32 ++++++------------- sys/uvm/uvm_fault.c | 35 ++++++--------------- sys/uvm/uvm_glue.c | 23 +++----------- sys/uvm/uvm_init.c | 4 +-- sys/uvm/uvm_loan.c | 41 ++++++------------------- sys/uvm/uvm_map_i.h | 23 ++++---------- sys/uvm/uvm_meter.c | 20 ++++-------- sys/uvm/uvm_mmap.c | 85 +++++++++++---------------------------------------- sys/uvm/uvm_pager.c | 4 +-- sys/uvm/uvm_pdaemon.c | 8 ++--- sys/uvm/uvm_pglist.c | 9 ++---- sys/uvm/uvm_stat.c | 11 +++---- sys/uvm/uvm_swap.c | 79 +++++++++++++---------------------------------- sys/uvm/uvm_unix.c | 18 +++-------- sys/uvm/uvm_vnode.c | 79 +++++++++++++++-------------------------------- 18 files changed, 172 insertions(+), 436 deletions(-) (limited to 'sys/uvm') diff --git a/sys/uvm/uvm_amap_i.h b/sys/uvm/uvm_amap_i.h index 16fe523e572..d71cab1f7be 100644 --- a/sys/uvm/uvm_amap_i.h +++ b/sys/uvm/uvm_amap_i.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_amap_i.h,v 1.18 2007/06/18 21:51:15 pedro Exp $ */ +/* $OpenBSD: uvm_amap_i.h,v 1.19 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_amap_i.h,v 1.15 2000/11/25 06:27:59 chs Exp $ */ /* @@ -55,9 +55,7 @@ * => amap should be locked by caller. */ AMAP_INLINE struct vm_anon * -amap_lookup(aref, offset) - struct vm_aref *aref; - vaddr_t offset; +amap_lookup(struct vm_aref *aref, vaddr_t offset) { int slot; struct vm_amap *amap = aref->ar_amap; @@ -81,11 +79,8 @@ amap_lookup(aref, offset) * => XXXCDC: this interface is biased toward array-based amaps. fix. */ AMAP_INLINE void -amap_lookups(aref, offset, anons, npages) - struct vm_aref *aref; - vaddr_t offset; - struct vm_anon **anons; - int npages; +amap_lookups(struct vm_aref *aref, vaddr_t offset, + struct vm_anon **anons, int npages) { int slot; struct vm_amap *amap = aref->ar_amap; @@ -115,11 +110,8 @@ amap_lookups(aref, offset, anons, npages) * => returns an "offset" which is meaningful to amap_unadd(). */ AMAP_INLINE void -amap_add(aref, offset, anon, replace) - struct vm_aref *aref; - vaddr_t offset; - struct vm_anon *anon; - boolean_t replace; +amap_add(struct vm_aref *aref, vaddr_t offset, struct vm_anon *anon, + boolean_t replace) { int slot; struct vm_amap *amap = aref->ar_amap; @@ -163,9 +155,7 @@ amap_add(aref, offset, anon, replace) * => caller must lock amap */ AMAP_INLINE void -amap_unadd(aref, offset) - struct vm_aref *aref; - vaddr_t offset; +amap_unadd(struct vm_aref *aref, vaddr_t offset) { int ptr, slot; struct vm_amap *amap = aref->ar_amap; @@ -199,11 +189,7 @@ amap_unadd(aref, offset) * => called at fork time to gain the child's reference */ AMAP_INLINE void -amap_ref(amap, offset, len, flags) - struct vm_amap *amap; - vaddr_t offset; - vsize_t len; - int flags; +amap_ref(struct vm_amap *amap, vaddr_t offset, vsize_t len, int flags) { UVMHIST_FUNC("amap_ref"); UVMHIST_CALLED(maphist); @@ -234,11 +220,7 @@ amap_ref(amap, offset, len, flags) * => amap must be unlocked (we will lock it). */ AMAP_INLINE void -amap_unref(amap, offset, len, all) - struct vm_amap *amap; - vaddr_t offset; - vsize_t len; - boolean_t all; +amap_unref(struct vm_amap *amap, vaddr_t offset, vsize_t len, boolean_t all) { UVMHIST_FUNC("amap_unref"); UVMHIST_CALLED(maphist); diff --git a/sys/uvm/uvm_anon.c b/sys/uvm/uvm_anon.c index a718f69276a..0f3d96a45df 100644 --- a/sys/uvm/uvm_anon.c +++ b/sys/uvm/uvm_anon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_anon.c,v 1.29 2008/04/10 16:43:47 miod Exp $ */ +/* $OpenBSD: uvm_anon.c,v 1.30 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_anon.c,v 1.10 2000/11/25 06:27:59 chs Exp $ */ /* @@ -53,7 +53,7 @@ struct pool uvm_anon_pool; * allocate anons */ void -uvm_anon_init() +uvm_anon_init(void) { pool_init(&uvm_anon_pool, sizeof(struct vm_anon), 0, 0, 0, "anonpl", &pool_allocator_nointr); @@ -64,7 +64,7 @@ uvm_anon_init() * allocate an anon */ struct vm_anon * -uvm_analloc() +uvm_analloc(void) { struct vm_anon *anon; @@ -88,8 +88,7 @@ uvm_analloc() * => we may lock the pageq's. */ void -uvm_anfree(anon) - struct vm_anon *anon; +uvm_anfree(struct vm_anon *anon) { struct vm_page *pg; UVMHIST_FUNC("uvm_anfree"); UVMHIST_CALLED(maphist); @@ -186,8 +185,7 @@ uvm_anfree(anon) * => anon must be locked or have a reference count of 0. */ void -uvm_anon_dropswap(anon) - struct vm_anon *anon; +uvm_anon_dropswap(struct vm_anon *anon) { UVMHIST_FUNC("uvm_anon_dropswap"); UVMHIST_CALLED(maphist); @@ -218,8 +216,7 @@ uvm_anon_dropswap(anon) * count. */ struct vm_page * -uvm_anon_lockloanpg(anon) - struct vm_anon *anon; +uvm_anon_lockloanpg(struct vm_anon *anon) { struct vm_page *pg; boolean_t locked = FALSE; @@ -303,8 +300,7 @@ uvm_anon_lockloanpg(anon) */ boolean_t -uvm_anon_pagein(anon) - struct vm_anon *anon; +uvm_anon_pagein(struct vm_anon *anon) { struct vm_page *pg; struct uvm_object *uobj; diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 74a087ab512..4fd652fd32d 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_aobj.c,v 1.35 2007/09/07 15:00:20 art Exp $ */ +/* $OpenBSD: uvm_aobj.c,v 1.36 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */ /* @@ -167,17 +167,17 @@ struct pool uvm_aobj_pool; * local functions */ -static struct uao_swhash_elt *uao_find_swhash_elt(struct uvm_aobj *, - int, boolean_t); +static struct uao_swhash_elt *uao_find_swhash_elt(struct uvm_aobj *, int, + boolean_t); static int uao_find_swslot(struct uvm_aobj *, int); -static boolean_t uao_flush(struct uvm_object *, - voff_t, voff_t, int); +static boolean_t uao_flush(struct uvm_object *, voff_t, + voff_t, int); static void uao_free(struct uvm_aobj *); static int uao_get(struct uvm_object *, voff_t, - vm_page_t *, int *, int, - vm_prot_t, int, int); + vm_page_t *, int *, int, vm_prot_t, + int, int); static boolean_t uao_releasepg(struct vm_page *, - struct vm_page **); + struct vm_page **); static boolean_t uao_pagein(struct uvm_aobj *, int, int); static boolean_t uao_pagein_page(struct uvm_aobj *, int); @@ -224,10 +224,7 @@ static simple_lock_data_t uao_list_lock; */ static struct uao_swhash_elt * -uao_find_swhash_elt(aobj, pageidx, create) - struct uvm_aobj *aobj; - int pageidx; - boolean_t create; +uao_find_swhash_elt(struct uvm_aobj *aobj, int pageidx, boolean_t create) { struct uao_swhash *swhash; struct uao_swhash_elt *elt; @@ -267,9 +264,7 @@ uao_find_swhash_elt(aobj, pageidx, create) * => object must be locked by caller */ __inline static int -uao_find_swslot(aobj, pageidx) - struct uvm_aobj *aobj; - int pageidx; +uao_find_swslot(struct uvm_aobj *aobj, int pageidx) { /* @@ -306,9 +301,7 @@ uao_find_swslot(aobj, pageidx) * => object must be locked by caller */ int -uao_set_swslot(uobj, pageidx, slot) - struct uvm_object *uobj; - int pageidx, slot; +uao_set_swslot(struct uvm_object *uobj, int pageidx, int slot) { struct uvm_aobj *aobj = (struct uvm_aobj *)uobj; int oldslot; @@ -388,8 +381,7 @@ uao_set_swslot(uobj, pageidx, slot) * => the aobj should be dead */ static void -uao_free(aobj) - struct uvm_aobj *aobj; +uao_free(struct uvm_aobj *aobj) { simple_unlock(&aobj->u_obj.vmobjlock); @@ -472,9 +464,7 @@ uao_free(aobj) * UAO_FLAG_KERNSWAP - enable swapping of kernel object (" ") */ struct uvm_object * -uao_create(size, flags) - vsize_t size; - int flags; +uao_create(vsize_t size, int flags) { static struct uvm_aobj kernel_object_store; /* home of kernel_object */ static int kobj_alloced = 0; /* not allocated yet */ @@ -565,7 +555,7 @@ uao_create(size, flags) * => called at boot time from uvm_pager_init() */ void -uao_init() +uao_init(void) { static int uao_initialized; @@ -594,8 +584,7 @@ uao_init() * => just lock it and call the locked version */ void -uao_reference(uobj) - struct uvm_object *uobj; +uao_reference(struct uvm_object *uobj) { simple_lock(&uobj->vmobjlock); uao_reference_locked(uobj); @@ -611,8 +600,7 @@ uao_reference(uobj) * it's already locked. */ void -uao_reference_locked(uobj) - struct uvm_object *uobj; +uao_reference_locked(struct uvm_object *uobj) { UVMHIST_FUNC("uao_reference"); UVMHIST_CALLED(maphist); @@ -636,8 +624,7 @@ uao_reference_locked(uobj) * => just lock it and call the locked version */ void -uao_detach(uobj) - struct uvm_object *uobj; +uao_detach(struct uvm_object *uobj) { simple_lock(&uobj->vmobjlock); uao_detach_locked(uobj); @@ -653,8 +640,7 @@ uao_detach(uobj) * it's already locked. */ void -uao_detach_locked(uobj) - struct uvm_object *uobj; +uao_detach_locked(struct uvm_object *uobj) { struct uvm_aobj *aobj = (struct uvm_aobj *)uobj; struct vm_page *pg, *next; @@ -779,10 +765,7 @@ uao_detach_locked(uobj) #define UAO_HASH_PENALTY 4 /* XXX: a guess */ boolean_t -uao_flush(uobj, start, stop, flags) - struct uvm_object *uobj; - voff_t start, stop; - int flags; +uao_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags) { struct uvm_aobj *aobj = (struct uvm_aobj *) uobj; struct vm_page *pp, *ppnext; @@ -949,13 +932,8 @@ uao_flush(uobj, start, stop, flags) * => NOTE: caller must check for released pages!! */ static int -uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) - struct uvm_object *uobj; - voff_t offset; - struct vm_page **pps; - int *npagesp; - int centeridx, advice, flags; - vm_prot_t access_type; +uao_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps, + int *npagesp, int centeridx, vm_prot_t access_type, int advice, int flags) { struct uvm_aobj *aobj = (struct uvm_aobj *)uobj; voff_t current_offset; @@ -1256,9 +1234,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) * kill it ("KILLME"). */ static boolean_t -uao_releasepg(pg, nextpgp) - struct vm_page *pg; - struct vm_page **nextpgp; /* OUT */ +uao_releasepg(struct vm_page *pg, struct vm_page **nextpgp /* OUT */) { struct uvm_aobj *aobj = (struct uvm_aobj *) pg->uobject; @@ -1307,9 +1283,7 @@ uao_releasepg(pg, nextpgp) */ void -uao_dropswap(uobj, pageidx) - struct uvm_object *uobj; - int pageidx; +uao_dropswap(struct uvm_object *uobj, int pageidx) { int slot; @@ -1327,8 +1301,7 @@ uao_dropswap(uobj, pageidx) * => returns TRUE if pagein was aborted due to lack of memory. */ boolean_t -uao_swap_off(startslot, endslot) - int startslot, endslot; +uao_swap_off(int startslot, int endslot) { struct uvm_aobj *aobj, *nextaobj; @@ -1400,9 +1373,7 @@ restart: * => returns TRUE if pagein was aborted due to lack of memory. */ static boolean_t -uao_pagein(aobj, startslot, endslot) - struct uvm_aobj *aobj; - int startslot, endslot; +uao_pagein(struct uvm_aobj *aobj, int startslot, int endslot) { boolean_t rv; @@ -1476,9 +1447,7 @@ restart: * => aobj must be locked and is returned locked. */ static boolean_t -uao_pagein_page(aobj, pageidx) - struct uvm_aobj *aobj; - int pageidx; +uao_pagein_page(struct uvm_aobj *aobj, int pageidx) { struct vm_page *pg; int rv, slot, npages; diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index 88404d23d8c..ce32ba02215 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_device.c,v 1.28 2007/10/29 17:08:08 chl Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.29 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */ /* @@ -95,7 +95,7 @@ struct uvm_pagerops uvm_deviceops = { */ void -udv_init() +udv_init(void) { LIST_INIT(&udv_list); @@ -110,13 +110,11 @@ udv_init() * * => caller must _not_ already be holding the lock on the uvm_object. * => in fact, nothing should be locked so that we can sleep here. + * + * The last two arguments (off and size) are only used for access checking. */ struct uvm_object * -udv_attach(arg, accessprot, off, size) - void *arg; - vm_prot_t accessprot; - voff_t off; /* used only for access check */ - vsize_t size; /* used only for access check */ +udv_attach(void *arg, vm_prot_t accessprot, voff_t off, vsize_t size) { dev_t device = *((dev_t *)arg); struct uvm_device *udv, *lcv; @@ -270,8 +268,7 @@ udv_attach(arg, accessprot, off, size) */ static void -udv_reference(uobj) - struct uvm_object *uobj; +udv_reference(struct uvm_object *uobj) { UVMHIST_FUNC("udv_reference"); UVMHIST_CALLED(maphist); @@ -291,8 +288,7 @@ udv_reference(uobj) */ static void -udv_detach(uobj) - struct uvm_object *uobj; +udv_detach(struct uvm_object *uobj) { struct uvm_device *udv = (struct uvm_device *)uobj; UVMHIST_FUNC("udv_detach"); UVMHIST_CALLED(maphist); @@ -344,10 +340,7 @@ again: */ static boolean_t -udv_flush(uobj, start, stop, flags) - struct uvm_object *uobj; - voff_t start, stop; - int flags; +udv_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags) { return(TRUE); @@ -370,13 +363,8 @@ udv_flush(uobj, start, stop, flags) */ static int -udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) - struct uvm_faultinfo *ufi; - vaddr_t vaddr; - vm_page_t *pps; - int npages, centeridx, flags; - vm_fault_t fault_type; - vm_prot_t access_type; +udv_fault( struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, int npages, + int centeridx, vm_fault_t fault_type, vm_prot_t access_type, int flags) { struct vm_map_entry *entry = ufi->entry; struct uvm_object *uobj = entry->object.uvm_obj; diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index 981f21d7521..be5e24d0cca 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.50 2008/09/16 18:52:52 chl Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.51 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */ /* @@ -189,9 +189,7 @@ static __inline void uvmfault_anonflush(struct vm_anon **, int); */ static __inline void -uvmfault_anonflush(anons, n) - struct vm_anon **anons; - int n; +uvmfault_anonflush(struct vm_anon **anons, int n) { int lcv; struct vm_page *pg; @@ -230,8 +228,7 @@ uvmfault_anonflush(anons, n) */ static void -uvmfault_amapcopy(ufi) - struct uvm_faultinfo *ufi; +uvmfault_amapcopy(struct uvm_faultinfo *ufi) { /* @@ -292,10 +289,8 @@ uvmfault_amapcopy(ufi) */ int -uvmfault_anonget(ufi, amap, anon) - struct uvm_faultinfo *ufi; - struct vm_amap *amap; - struct vm_anon *anon; +uvmfault_anonget(struct uvm_faultinfo *ufi, struct vm_amap *amap, + struct vm_anon *anon) { boolean_t we_own; /* we own anon's page? */ boolean_t locked; /* did we relock? */ @@ -556,11 +551,8 @@ uvmfault_anonget(ufi, amap, anon) ~VM_PROT_WRITE : VM_PROT_ALL) int -uvm_fault(orig_map, vaddr, fault_type, access_type) - vm_map_t orig_map; - vaddr_t vaddr; - vm_fault_t fault_type; - vm_prot_t access_type; +uvm_fault(vm_map_t orig_map, vaddr_t vaddr, vm_fault_t fault_type, + vm_prot_t access_type) { struct uvm_faultinfo ufi; vm_prot_t enter_prot; @@ -1768,10 +1760,7 @@ Case2: */ int -uvm_fault_wire(map, start, end, access_type) - vm_map_t map; - vaddr_t start, end; - vm_prot_t access_type; +uvm_fault_wire(vm_map_t map, vaddr_t start, vaddr_t end, vm_prot_t access_type) { vaddr_t va; pmap_t pmap; @@ -1803,9 +1792,7 @@ uvm_fault_wire(map, start, end, access_type) */ void -uvm_fault_unwire(map, start, end) - vm_map_t map; - vaddr_t start, end; +uvm_fault_unwire(vm_map_t map, vaddr_t start, vaddr_t end) { vm_map_lock_read(map); @@ -1820,9 +1807,7 @@ uvm_fault_unwire(map, start, end) */ void -uvm_fault_unwire_locked(map, start, end) - vm_map_t map; - vaddr_t start, end; +uvm_fault_unwire_locked(vm_map_t map, vaddr_t start, vaddr_t end) { vm_map_entry_t entry; pmap_t pmap = vm_map_pmap(map); diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index 2e2691518b0..27141201a8d 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_glue.c,v 1.48 2008/10/24 06:32:46 deraadt Exp $ */ +/* $OpenBSD: uvm_glue.c,v 1.49 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */ /* @@ -101,10 +101,7 @@ int readbuffers = 0; /* allow KGDB to read kern buffer pool */ */ boolean_t -uvm_kernacc(addr, len, rw) - caddr_t addr; - size_t len; - int rw; +uvm_kernacc(caddr_t addr, size_t len, int rw) { boolean_t rv; vaddr_t saddr, eaddr; @@ -133,10 +130,7 @@ uvm_kernacc(addr, len, rw) * we can ensure the change takes place properly. */ void -uvm_chgkprot(addr, len, rw) - caddr_t addr; - size_t len; - int rw; +uvm_chgkprot(caddr_t addr, size_t len, int rw) { vm_prot_t prot; paddr_t pa; @@ -167,11 +161,7 @@ uvm_chgkprot(addr, len, rw) */ int -uvm_vslock(p, addr, len, access_type) - struct proc *p; - caddr_t addr; - size_t len; - vm_prot_t access_type; +uvm_vslock(struct proc *p, caddr_t addr, size_t len, vm_prot_t access_type) { vm_map_t map; vaddr_t start, end; @@ -196,10 +186,7 @@ uvm_vslock(p, addr, len, access_type) */ void -uvm_vsunlock(p, addr, len) - struct proc *p; - caddr_t addr; - size_t len; +uvm_vsunlock(struct proc *p, caddr_t addr, size_t len) { vaddr_t start, end; diff --git a/sys/uvm/uvm_init.c b/sys/uvm/uvm_init.c index 75b7bde3a45..82bbb31e780 100644 --- a/sys/uvm/uvm_init.c +++ b/sys/uvm/uvm_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_init.c,v 1.19 2008/11/24 19:19:46 kurt Exp $ */ +/* $OpenBSD: uvm_init.c,v 1.20 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_init.c,v 1.14 2000/06/27 17:29:23 mrg Exp $ */ /* @@ -68,7 +68,7 @@ struct uvmexp uvmexp; /* decl */ */ void -uvm_init() +uvm_init(void) { vaddr_t kvm_start, kvm_end; diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c index 84cbd82ae84..fae7441c50a 100644 --- a/sys/uvm/uvm_loan.c +++ b/sys/uvm/uvm_loan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_loan.c,v 1.28 2007/06/18 21:51:15 pedro Exp $ */ +/* $OpenBSD: uvm_loan.c,v 1.29 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */ /* @@ -127,10 +127,7 @@ static int uvm_loanzero(struct uvm_faultinfo *, void ***, int); */ static __inline int -uvm_loanentry(ufi, output, flags) - struct uvm_faultinfo *ufi; - void ***output; - int flags; +uvm_loanentry(struct uvm_faultinfo *ufi, void ***output, int flags) { vaddr_t curaddr = ufi->orig_rvaddr; vsize_t togo = ufi->size; @@ -209,12 +206,8 @@ uvm_loanentry(ufi, output, flags) */ int -uvm_loan(map, start, len, result, flags) - struct vm_map *map; - vaddr_t start; - vsize_t len; - void **result; - int flags; +uvm_loan(struct vm_map *map, vaddr_t start, vsize_t len, + void **result, int flags) { struct uvm_faultinfo ufi; void **output; @@ -316,11 +309,8 @@ fail: */ int -uvm_loananon(ufi, output, flags, anon) - struct uvm_faultinfo *ufi; - void ***output; - int flags; - struct vm_anon *anon; +uvm_loananon(struct uvm_faultinfo *ufi, void ***output, int flags, + struct vm_anon *anon) { struct vm_page *pg; int result; @@ -405,11 +395,7 @@ uvm_loananon(ufi, output, flags, anon) */ int -uvm_loanuobj(ufi, output, flags, va) - struct uvm_faultinfo *ufi; - void ***output; - int flags; - vaddr_t va; +uvm_loanuobj(struct uvm_faultinfo *ufi, void ***output, int flags, vaddr_t va) { struct vm_amap *amap = ufi->entry->aref.ar_amap; struct uvm_object *uobj = ufi->entry->object.uvm_obj; @@ -608,10 +594,7 @@ uvm_loanuobj(ufi, output, flags, va) */ int -uvm_loanzero(ufi, output, flags) - struct uvm_faultinfo *ufi; - void ***output; - int flags; +uvm_loanzero(struct uvm_faultinfo *ufi, void ***output, int flags) { struct vm_anon *anon; struct vm_page *pg; @@ -688,9 +671,7 @@ uvm_loanzero(ufi, output, flags) */ void -uvm_unloananon(aloans, nanons) - struct vm_anon **aloans; - int nanons; +uvm_unloananon(struct vm_anon **aloans, int nanons) { struct vm_anon *anon; @@ -715,9 +696,7 @@ uvm_unloananon(aloans, nanons) */ void -uvm_unloanpage(ploans, npages) - struct vm_page **ploans; - int npages; +uvm_unloanpage(struct vm_page **ploans, int npages) { struct vm_page *pg; diff --git a/sys/uvm/uvm_map_i.h b/sys/uvm/uvm_map_i.h index c4d1f2c4363..09fcc7b37c5 100644 --- a/sys/uvm/uvm_map_i.h +++ b/sys/uvm/uvm_map_i.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map_i.h,v 1.22 2007/10/29 17:08:08 chl Exp $ */ +/* $OpenBSD: uvm_map_i.h,v 1.23 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_map_i.h,v 1.18 2000/11/27 08:40:04 chs Exp $ */ /* @@ -85,10 +85,7 @@ */ MAP_INLINE vm_map_t -uvm_map_create(pmap, min, max, flags) - pmap_t pmap; - vaddr_t min, max; - int flags; +uvm_map_create(pmap_t pmap, vaddr_t min, vaddr_t max, int flags) { vm_map_t result; @@ -105,10 +102,7 @@ uvm_map_create(pmap, min, max, flags) */ MAP_INLINE void -uvm_map_setup(map, min, max, flags) - vm_map_t map; - vaddr_t min, max; - int flags; +uvm_map_setup(vm_map_t map, vaddr_t min, vaddr_t max, int flags) { RB_INIT(&map->rbhead); @@ -140,10 +134,7 @@ uvm_map_setup(map, min, max, flags) */ MAP_INLINE void -uvm_unmap_p(map, start, end, p) - vm_map_t map; - vaddr_t start,end; - struct proc *p; +uvm_unmap_p(vm_map_t map, vaddr_t start, vaddr_t end, struct proc *p) { vm_map_entry_t dead_entries; UVMHIST_FUNC("uvm_unmap"); UVMHIST_CALLED(maphist); @@ -172,8 +163,7 @@ uvm_unmap_p(map, start, end, p) */ MAP_INLINE void -uvm_map_reference(map) - vm_map_t map; +uvm_map_reference(vm_map_t map) { simple_lock(&map->ref_lock); map->ref_count++; @@ -188,8 +178,7 @@ uvm_map_reference(map) */ MAP_INLINE void -uvm_map_deallocate(map) - vm_map_t map; +uvm_map_deallocate(vm_map_t map) { int c; diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c index 80291539872..3c10fff7847 100644 --- a/sys/uvm/uvm_meter.c +++ b/sys/uvm/uvm_meter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_meter.c,v 1.24 2007/12/15 03:42:57 deraadt Exp $ */ +/* $OpenBSD: uvm_meter.c,v 1.25 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $ */ /* @@ -82,7 +82,7 @@ static void uvm_loadav(struct loadavg *); * uvm_meter: calculate load average and wake up the swapper (if needed) */ void -uvm_meter() +uvm_meter(void) { if ((time_second % 5) == 0) uvm_loadav(&averunnable); @@ -95,8 +95,7 @@ uvm_meter() * 1, 5, and 15 minute intervals. */ static void -uvm_loadav(avg) - struct loadavg *avg; +uvm_loadav(struct loadavg *avg) { int i, nrun; struct proc *p; @@ -125,14 +124,8 @@ uvm_loadav(avg) * uvm_sysctl: sysctl hook into UVM system. */ int -uvm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) - int *name; - u_int namelen; - void *oldp; - size_t *oldlenp; - void *newp; - size_t newlen; - struct proc *p; +uvm_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, + size_t newlen, struct proc *p) { struct vmtotal vmtotals; int rv, t; @@ -232,8 +225,7 @@ uvm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) * uvm_total: calculate the current state of the system. */ void -uvm_total(totalp) - struct vmtotal *totalp; +uvm_total(struct vmtotal *totalp) { struct proc *p; #if 0 diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index b409c5a3ab0..685eb5d341e 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.71 2008/11/10 03:56:16 deraadt Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.72 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -101,10 +101,7 @@ /* ARGSUSED */ int -sys_sbrk(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_sbrk(struct proc *p, void *v, register_t *retval) { #if 0 struct sys_sbrk_args /* { @@ -121,10 +118,7 @@ sys_sbrk(p, v, retval) /* ARGSUSED */ int -sys_sstk(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_sstk(struct proc *p, void *v, register_t *retval) { #if 0 struct sys_sstk_args /* { @@ -147,10 +141,7 @@ sys_sstk(p, v, retval) */ int -sys_mquery(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mquery(struct proc *p, void *v, register_t *retval) { struct sys_mquery_args /* { syscallarg(void *) addr; @@ -238,10 +229,7 @@ done: /* ARGSUSED */ int -sys_mincore(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mincore(struct proc *p, void *v, register_t *retval) { struct sys_mincore_args /* { syscallarg(void *) addr; @@ -378,10 +366,7 @@ sys_mincore(p, v, retval) */ int -sys_mmap(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mmap(struct proc *p, void *v, register_t *retval) { struct sys_mmap_args /* { syscallarg(void *) addr; @@ -622,10 +607,7 @@ out: */ int -sys_msync(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_msync(struct proc *p, void *v, register_t *retval) { struct sys_msync_args /* { syscallarg(void *) addr; @@ -709,10 +691,7 @@ sys_msync(p, v, retval) */ int -sys_munmap(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_munmap(struct proc *p, void *v, register_t *retval) { struct sys_munmap_args /* { syscallarg(void *) addr; @@ -779,10 +758,7 @@ sys_munmap(p, v, retval) */ int -sys_mprotect(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mprotect(struct proc *p, void *v, register_t *retval) { struct sys_mprotect_args /* { syscallarg(void *) addr; @@ -820,10 +796,7 @@ sys_mprotect(p, v, retval) */ int -sys_minherit(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_minherit(struct proc *p, void *v, register_t *retval) { struct sys_minherit_args /* { syscallarg(void *) addr; @@ -855,10 +828,7 @@ sys_minherit(p, v, retval) /* ARGSUSED */ int -sys_madvise(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_madvise(struct proc *p, void *v, register_t *retval) { struct sys_madvise_args /* { syscallarg(void *) addr; @@ -945,10 +915,7 @@ sys_madvise(p, v, retval) */ int -sys_mlock(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mlock(struct proc *p, void *v, register_t *retval) { struct sys_mlock_args /* { syscallarg(const void *) addr; @@ -993,10 +960,7 @@ sys_mlock(p, v, retval) */ int -sys_munlock(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_munlock(struct proc *p, void *v, register_t *retval) { struct sys_munlock_args /* { syscallarg(const void *) addr; @@ -1035,10 +999,7 @@ sys_munlock(p, v, retval) */ int -sys_mlockall(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_mlockall(struct proc *p, void *v, register_t *retval) { struct sys_mlockall_args /* { syscallarg(int) flags; @@ -1068,10 +1029,7 @@ sys_mlockall(p, v, retval) */ int -sys_munlockall(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_munlockall(struct proc *p, void *v, register_t *retval) { (void) uvm_map_pageable_all(&p->p_vmspace->vm_map, 0, 0); @@ -1088,16 +1046,9 @@ sys_munlockall(p, v, retval) */ int -uvm_mmap(map, addr, size, prot, maxprot, flags, handle, foff, locklimit, p) - vm_map_t map; - vaddr_t *addr; - vsize_t size; - vm_prot_t prot, maxprot; - int flags; - caddr_t handle; /* XXX: VNODE? */ - voff_t foff; - vsize_t locklimit; - struct proc *p; +uvm_mmap(vm_map_t map, vaddr_t *addr, vsize_t size, vm_prot_t prot, + vm_prot_t maxprot, int flags, caddr_t handle, voff_t foff, + vsize_t locklimit, struct proc *p) { struct uvm_object *uobj; struct vnode *vp; diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c index 81020bbeba9..b5ddf391489 100644 --- a/sys/uvm/uvm_pager.c +++ b/sys/uvm/uvm_pager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pager.c,v 1.46 2009/01/27 19:21:03 ariane Exp $ */ +/* $OpenBSD: uvm_pager.c,v 1.47 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */ /* @@ -98,7 +98,7 @@ void uvm_pseg_release(vaddr_t); */ void -uvm_pager_init() +uvm_pager_init(void) { int lcv; diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 695a07f8abe..c2846d03b4d 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.36 2009/01/12 19:03:12 miod Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.37 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -108,8 +108,7 @@ static void uvmpd_tune(void); */ void -uvm_wait(wmsg) - const char *wmsg; +uvm_wait(const char *wmsg) { int timo = 0; int s = splbio(); @@ -357,8 +356,7 @@ uvm_aiodone_daemon(void *arg) */ static boolean_t -uvmpd_scan_inactive(pglst) - struct pglist *pglst; +uvmpd_scan_inactive(struct pglist *pglst) { boolean_t retval = FALSE; /* assume we haven't hit target */ int free, result; diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c index 3cc211afbc9..94d5d732314 100644 --- a/sys/uvm/uvm_pglist.c +++ b/sys/uvm/uvm_pglist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pglist.c,v 1.24 2008/10/01 20:00:32 miod Exp $ */ +/* $OpenBSD: uvm_pglist.c,v 1.25 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $ */ /*- @@ -183,11 +183,8 @@ out: */ int -uvm_pglistalloc(size, low, high, alignment, boundary, rlist, nsegs, waitok) - psize_t size; - paddr_t low, high, alignment, boundary; - struct pglist *rlist; - int nsegs, waitok; +uvm_pglistalloc(psize_t size, paddr_t low, paddr_t high, paddr_t alignment, + paddr_t boundary, struct pglist *rlist, int nsegs, int waitok) { int psi; struct vm_page *pgs; diff --git a/sys/uvm/uvm_stat.c b/sys/uvm/uvm_stat.c index bdefaf94e37..5e2e9601424 100644 --- a/sys/uvm/uvm_stat.c +++ b/sys/uvm/uvm_stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_stat.c,v 1.19 2007/04/19 16:20:07 art Exp $ */ +/* $OpenBSD: uvm_stat.c,v 1.20 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_stat.c,v 1.18 2001/03/09 01:02:13 chs Exp $ */ /* @@ -76,8 +76,7 @@ void uvmcnt_dump(void); #ifdef UVMHIST /* call this from ddb */ void -uvmhist_dump(l) - struct uvm_history *l; +uvmhist_dump(struct uvm_history *l) { int lcv, s; @@ -95,8 +94,7 @@ uvmhist_dump(l) * print a merged list of uvm_history structures */ static void -uvmhist_dump_histories(hists) - struct uvm_history *hists[]; +uvmhist_dump_histories(struct uvm_history *hists[]) { struct timeval tv; int cur[MAXHISTS]; @@ -168,8 +166,7 @@ restart: * merges the named histories. */ void -uvm_hist(bitmask) - u_int32_t bitmask; /* XXX only support 32 hists */ +uvm_hist(u_int32_t bitmask) /* XXX only support 32 hists */ { struct uvm_history *hists[MAXHISTS + 1]; int i = 0; diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 923cc81fe45..c32844a1425 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.85 2009/01/25 17:30:49 miod Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.86 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -262,7 +262,7 @@ void uvm_swap_initcrypt(struct swapdev *, int); * are brought up (which happens after uvm_init()) */ void -uvm_swap_init() +uvm_swap_init(void) { UVMHIST_FUNC("uvm_swap_init"); @@ -399,7 +399,7 @@ uvm_swap_freepages(struct vm_page **pps, int npages) void uvm_swap_markdecrypt(struct swapdev *sdp, int startslot, int npages, - int decrypt) + int decrypt) { int pagestart, i; int off, bit; @@ -476,10 +476,7 @@ uvm_swap_finicrypt_all(void) * here while adding swap) */ static void -swaplist_insert(sdp, newspp, priority) - struct swapdev *sdp; - struct swappri *newspp; - int priority; +swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority) { struct swappri *spp, *pspp; UVMHIST_FUNC("swaplist_insert"); UVMHIST_CALLED(pdhist); @@ -531,9 +528,7 @@ swaplist_insert(sdp, newspp, priority) * => we return the swapdev we found (and removed) */ static struct swapdev * -swaplist_find(vp, remove) - struct vnode *vp; - boolean_t remove; +swaplist_find(struct vnode *vp, boolean_t remove) { struct swapdev *sdp; struct swappri *spp; @@ -566,7 +561,7 @@ swaplist_find(vp, remove) * => caller must hold both swap_syscall_lock and uvm.swap_data_lock */ static void -swaplist_trim() +swaplist_trim(void) { struct swappri *spp, *nextspp; @@ -587,9 +582,7 @@ swaplist_trim() * => uvm.swap_data_lock should be unlocked (we may sleep) */ static void -swapdrum_add(sdp, npages) - struct swapdev *sdp; - int npages; +swapdrum_add(struct swapdev *sdp, int npages) { u_long result; @@ -609,8 +602,7 @@ swapdrum_add(sdp, npages) * => caller must hold uvm.swap_data_lock */ static struct swapdev * -swapdrum_getsdp(pgno) - int pgno; +swapdrum_getsdp(int pgno) { struct swapdev *sdp; struct swappri *spp; @@ -633,10 +625,7 @@ swapdrum_getsdp(pgno) * [with two helper functions: swap_on and swap_off] */ int -sys_swapctl(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_swapctl(struct proc *p, void *v, register_t *retval) { struct sys_swapctl_args /* { syscallarg(int) cmd; @@ -901,9 +890,7 @@ out: * if needed. */ static int -swap_on(p, sdp) - struct proc *p; - struct swapdev *sdp; +swap_on(struct proc *p, struct swapdev *sdp) { static int count = 0; /* static */ struct vnode *vp; @@ -1101,9 +1088,7 @@ bad: * => swap data should be locked, we will unlock. */ static int -swap_off(p, sdp) - struct proc *p; - struct swapdev *sdp; +swap_off(struct proc *p, struct swapdev *sdp) { int error = 0; UVMHIST_FUNC("swap_off"); UVMHIST_CALLED(pdhist); @@ -1178,8 +1163,7 @@ swap_off(p, sdp) * => we must map the i/o request from the drum to the correct swapdev. */ void -swstrategy(bp) - struct buf *bp; +swstrategy(struct buf *bp) { struct swapdev *sdp; int s, pageno, bn; @@ -1253,10 +1237,7 @@ swstrategy(bp) * sw_reg_strategy: handle swap i/o to regular files */ static void -sw_reg_strategy(sdp, bp, bn) - struct swapdev *sdp; - struct buf *bp; - int bn; +sw_reg_strategy(struct swapdev *sdp, struct buf *bp, int bn) { struct vnode *vp; struct vndxfer *vnx; @@ -1433,8 +1414,7 @@ out: /* Arrive here at splbio */ * => reqs are sorted by disksort (above) */ static void -sw_reg_start(sdp) - struct swapdev *sdp; +sw_reg_start(struct swapdev *sdp) { struct buf *bp; UVMHIST_FUNC("sw_reg_start"); UVMHIST_CALLED(pdhist); @@ -1469,8 +1449,7 @@ sw_reg_start(sdp) * => note that we can recover the vndbuf struct by casting the buf ptr */ static void -sw_reg_iodone(bp) - struct buf *bp; +sw_reg_iodone(struct buf *bp) { struct vndbuf *vbp = (struct vndbuf *) bp; struct vndxfer *vnx = vbp->vb_xfer; @@ -1551,9 +1530,7 @@ sw_reg_iodone(bp) * => XXXMRG: "LESSOK" INTERFACE NEEDED TO EXTENT SYSTEM */ int -uvm_swap_alloc(nslots, lessok) - int *nslots; /* IN/OUT */ - boolean_t lessok; +uvm_swap_alloc(int *nslots, boolean_t lessok) { struct swapdev *sdp; struct swappri *spp; @@ -1621,9 +1598,7 @@ ReTry: /* XXXMRG */ * => we lock uvm.swap_data_lock */ void -uvm_swap_markbad(startslot, nslots) - int startslot; - int nslots; +uvm_swap_markbad(int startslot, int nslots) { struct swapdev *sdp; UVMHIST_FUNC("uvm_swap_markbad"); UVMHIST_CALLED(pdhist); @@ -1650,9 +1625,7 @@ uvm_swap_markbad(startslot, nslots) * => we lock uvm.swap_data_lock */ void -uvm_swap_free(startslot, nslots) - int startslot; - int nslots; +uvm_swap_free(int startslot, int nslots) { struct swapdev *sdp; UVMHIST_FUNC("uvm_swap_free"); UVMHIST_CALLED(pdhist); @@ -1716,11 +1689,7 @@ uvm_swap_free(startslot, nslots) * => XXXMRG: consider making it an inline or macro */ int -uvm_swap_put(swslot, ppsp, npages, flags) - int swslot; - struct vm_page **ppsp; - int npages; - int flags; +uvm_swap_put(int swslot, struct vm_page **ppsp, int npages, int flags) { int result; @@ -1737,9 +1706,7 @@ uvm_swap_put(swslot, ppsp, npages, flags) * => XXXMRG: consider making it an inline or macro */ int -uvm_swap_get(page, swslot, flags) - struct vm_page *page; - int swslot, flags; +uvm_swap_get(struct vm_page *page, int swslot, int flags) { int result; @@ -1776,9 +1743,7 @@ uvm_swap_get(page, swslot, flags) */ static int -uvm_swap_io(pps, startslot, npages, flags) - struct vm_page **pps; - int startslot, npages, flags; +uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags) { daddr64_t startblk; struct buf *bp; @@ -2053,7 +2018,7 @@ uvm_swap_io(pps, startslot, npages, flags) } static void -swapmount() +swapmount(void) { struct swapdev *sdp; struct swappri *spp; diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c index 118072ea12e..192faf6c106 100644 --- a/sys/uvm/uvm_unix.c +++ b/sys/uvm/uvm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_unix.c,v 1.35 2009/03/05 19:52:24 kettenis Exp $ */ +/* $OpenBSD: uvm_unix.c,v 1.36 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */ /* @@ -67,10 +67,7 @@ */ int -sys_obreak(p, v, retval) - struct proc *p; - void *v; - register_t *retval; +sys_obreak(struct proc *p, void *v, register_t *retval) { struct sys_obreak_args /* { syscallarg(char *) nsize; @@ -117,9 +114,7 @@ sys_obreak(p, v, retval) */ void -uvm_grow(p, sp) - struct proc *p; - vaddr_t sp; +uvm_grow(struct proc *p, vaddr_t sp) { struct vmspace *vm = p->p_vmspace; int si; @@ -157,11 +152,8 @@ uvm_grow(p, sp) */ int -uvm_coredump(p, vp, cred, chdr) - struct proc *p; - struct vnode *vp; - struct ucred *cred; - struct core *chdr; +uvm_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, + struct core *chdr) { struct vmspace *vm = p->p_vmspace; vm_map_t map = &vm->vm_map; diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index c816287d480..4316c4eb908 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.52 2008/10/06 18:17:29 deraadt Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.53 2009/03/20 15:19:04 oga Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */ /* @@ -84,22 +84,16 @@ struct rwlock uvn_sync_lock; /* locks sync operation */ * functions */ -void uvn_cluster(struct uvm_object *, voff_t, - voff_t *, voff_t *); -void uvn_detach(struct uvm_object *); -boolean_t uvn_flush(struct uvm_object *, voff_t, - voff_t, int); -int uvn_get(struct uvm_object *, voff_t, - vm_page_t *, int *, int, - vm_prot_t, int, int); -void uvn_init(void); -int uvn_io(struct uvm_vnode *, vm_page_t *, - int, int, int); -int uvn_put(struct uvm_object *, vm_page_t *, - int, boolean_t); -void uvn_reference(struct uvm_object *); -boolean_t uvn_releasepg(struct vm_page *, - struct vm_page **); +void uvn_cluster(struct uvm_object *, voff_t, voff_t *, voff_t *); +void uvn_detach(struct uvm_object *); +boolean_t uvn_flush(struct uvm_object *, voff_t, voff_t, int); +int uvn_get(struct uvm_object *, voff_t, vm_page_t *, int *, int, + vm_prot_t, int, int); +void uvn_init(void); +int uvn_io(struct uvm_vnode *, vm_page_t *, int, int, int); +int uvn_put(struct uvm_object *, vm_page_t *, int, boolean_t); +void uvn_reference(struct uvm_object *); +boolean_t uvn_releasepg(struct vm_page *, struct vm_page **); /* * master pager structure @@ -153,9 +147,7 @@ uvn_init(void) */ struct uvm_object * -uvn_attach(arg, accessprot) - void *arg; - vm_prot_t accessprot; +uvn_attach(void *arg, vm_prot_t accessprot) { struct vnode *vp = arg; struct uvm_vnode *uvn = &vp->v_uvm; @@ -323,8 +315,7 @@ uvn_attach(arg, accessprot) void -uvn_reference(uobj) - struct uvm_object *uobj; +uvn_reference(struct uvm_object *uobj) { #ifdef DEBUG struct uvm_vnode *uvn = (struct uvm_vnode *) uobj; @@ -355,8 +346,7 @@ uvn_reference(uobj) * (async i/o could still be pending). */ void -uvn_detach(uobj) - struct uvm_object *uobj; +uvn_detach(struct uvm_object *uobj) { struct uvm_vnode *uvn; struct vnode *vp; @@ -508,8 +498,7 @@ uvn_detach(uobj) */ void -uvm_vnp_terminate(vp) - struct vnode *vp; +uvm_vnp_terminate(struct vnode *vp) { struct uvm_vnode *uvn = &vp->v_uvm; int oldflags; @@ -658,9 +647,7 @@ uvm_vnp_terminate(vp) */ boolean_t -uvn_releasepg(pg, nextpgp) - struct vm_page *pg; - struct vm_page **nextpgp; /* OUT */ +uvn_releasepg(struct vm_page *pg, struct vm_page **nextpgp /* OUT */) { struct uvm_vnode *uvn = (struct uvm_vnode *) pg->uobject; #ifdef DIAGNOSTIC @@ -800,10 +787,7 @@ uvn_releasepg(pg, nextpgp) #define UVN_HASH_PENALTY 4 /* XXX: a guess */ boolean_t -uvn_flush(uobj, start, stop, flags) - struct uvm_object *uobj; - voff_t start, stop; - int flags; +uvn_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags) { struct uvm_vnode *uvn = (struct uvm_vnode *) uobj; struct vm_page *pp, *ppnext, *ptmp; @@ -1234,10 +1218,8 @@ ReTry: */ void -uvn_cluster(uobj, offset, loffset, hoffset) - struct uvm_object *uobj; - voff_t offset; - voff_t *loffset, *hoffset; /* OUT */ +uvn_cluster(struct uvm_object *uobj, voff_t offset, voff_t *loffset, + voff_t *hoffset) { struct uvm_vnode *uvn = (struct uvm_vnode *) uobj; *loffset = offset; @@ -1267,10 +1249,7 @@ uvn_cluster(uobj, offset, loffset, hoffset) */ int -uvn_put(uobj, pps, npages, flags) - struct uvm_object *uobj; - struct vm_page **pps; - int npages, flags; +uvn_put(struct uvm_object *uobj, struct vm_page **pps, int npages, int flags) { int retval; @@ -1294,13 +1273,8 @@ uvn_put(uobj, pps, npages, flags) */ int -uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) - struct uvm_object *uobj; - voff_t offset; - struct vm_page **pps; /* IN/OUT */ - int *npagesp; /* IN (OUT if PGO_LOCKED) */ - int centeridx, advice, flags; - vm_prot_t access_type; +uvn_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps, + int *npagesp, int centeridx, vm_prot_t access_type, int advice, int flags) { voff_t current_offset; struct vm_page *ptmp; @@ -1545,10 +1519,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) */ int -uvn_io(uvn, pps, npages, flags, rw) - struct uvm_vnode *uvn; - vm_page_t *pps; - int npages, flags, rw; +uvn_io(struct uvm_vnode *uvn, vm_page_t *pps, int npages, int flags, int rw) { struct vnode *vn; struct uio uio; @@ -1848,9 +1819,7 @@ uvm_vnp_uncache(struct vnode *vp) */ void -uvm_vnp_setsize(vp, newsize) - struct vnode *vp; - voff_t newsize; +uvm_vnp_setsize(struct vnode *vp, voff_t newsize) { struct uvm_vnode *uvn = &vp->v_uvm; -- cgit v1.2.3