diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-20 15:19:05 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-20 15:19:05 +0000 |
commit | 1cec66db340b5071320225ab7544cf7d5891842f (patch) | |
tree | 22b949af148fe1ed4ff4f59bdb4179edd3211d0e /sys/uvm/uvm_swap.c | |
parent | 8f59db0d17f07fc6ce24afa8af4713c585ef09a0 (diff) |
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@
Diffstat (limited to 'sys/uvm/uvm_swap.c')
-rw-r--r-- | sys/uvm/uvm_swap.c | 79 |
1 files changed, 22 insertions, 57 deletions
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; |