Sprinkle some static.

This commit is contained in:
thorpej 2005-06-27 02:29:32 +00:00
parent 154a970ff4
commit b651fb886d
3 changed files with 55 additions and 58 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_aobj.c,v 1.67 2005/06/27 02:19:48 thorpej Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.68 2005/06/27 02:29:32 thorpej Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.67 2005/06/27 02:19:48 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.68 2005/06/27 02:29:32 thorpej Exp $");
#include "opt_uvmhist.h"
@ -736,7 +736,7 @@ uao_detach_locked(struct uvm_object *uobj)
* start->stop range by a penalty which we define below.
*/
int
static int
uao_put(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
{
struct uvm_aobj *aobj = (struct uvm_aobj *)uobj;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_swap.c,v 1.93 2005/06/27 02:19:48 thorpej Exp $ */
/* $NetBSD: uvm_swap.c,v 1.94 2005/06/27 02:29:32 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.93 2005/06/27 02:19:48 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.94 2005/06/27 02:29:32 thorpej Exp $");
#include "fs_nfs.h"
#include "opt_uvmhist.h"
@ -237,19 +237,6 @@ static void sw_reg_start(struct swapdev *);
static int uvm_swap_io(struct vm_page **, int, int, int);
dev_type_read(swread);
dev_type_write(swwrite);
dev_type_strategy(swstrategy);
const struct bdevsw swap_bdevsw = {
noopen, noclose, swstrategy, noioctl, nodump, nosize,
};
const struct cdevsw swap_cdevsw = {
nullopen, nullclose, swread, swwrite, noioctl,
nostop, notty, nopoll, nommap, nokqfilter
};
/*
* uvm_swap_init: init the swap system data structures and locks
*
@ -1034,38 +1021,12 @@ swap_off(struct proc *p, struct swapdev *sdp)
* /dev/drum interface and i/o functions
*/
/*
* swread: the read function for the drum (just a call to physio)
*/
/*ARGSUSED*/
int
swread(dev_t dev, struct uio *uio, int ioflag)
{
UVMHIST_FUNC("swread"); UVMHIST_CALLED(pdhist);
UVMHIST_LOG(pdhist, " dev=%x offset=%qx", dev, uio->uio_offset, 0, 0);
return (physio(swstrategy, NULL, dev, B_READ, minphys, uio));
}
/*
* swwrite: the write function for the drum (just a call to physio)
*/
/*ARGSUSED*/
int
swwrite(dev_t dev, struct uio *uio, int ioflag)
{
UVMHIST_FUNC("swwrite"); UVMHIST_CALLED(pdhist);
UVMHIST_LOG(pdhist, " dev=%x offset=%qx", dev, uio->uio_offset, 0, 0);
return (physio(swstrategy, NULL, dev, B_WRITE, minphys, uio));
}
/*
* swstrategy: perform I/O on the drum
*
* => we must map the i/o request from the drum to the correct swapdev.
*/
void
static void
swstrategy(struct buf *bp)
{
struct swapdev *sdp;
@ -1149,6 +1110,41 @@ swstrategy(struct buf *bp)
/* NOTREACHED */
}
/*
* swread: the read function for the drum (just a call to physio)
*/
/*ARGSUSED*/
static int
swread(dev_t dev, struct uio *uio, int ioflag)
{
UVMHIST_FUNC("swread"); UVMHIST_CALLED(pdhist);
UVMHIST_LOG(pdhist, " dev=%x offset=%qx", dev, uio->uio_offset, 0, 0);
return (physio(swstrategy, NULL, dev, B_READ, minphys, uio));
}
/*
* swwrite: the write function for the drum (just a call to physio)
*/
/*ARGSUSED*/
static int
swwrite(dev_t dev, struct uio *uio, int ioflag)
{
UVMHIST_FUNC("swwrite"); UVMHIST_CALLED(pdhist);
UVMHIST_LOG(pdhist, " dev=%x offset=%qx", dev, uio->uio_offset, 0, 0);
return (physio(swstrategy, NULL, dev, B_WRITE, minphys, uio));
}
const struct bdevsw swap_bdevsw = {
noopen, noclose, swstrategy, noioctl, nodump, nosize,
};
const struct cdevsw swap_cdevsw = {
nullopen, nullclose, swread, swwrite, noioctl,
nostop, notty, nopoll, nommap, nokqfilter
};
/*
* sw_reg_strategy: handle swap i/o to regular files
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_vnode.c,v 1.65 2005/06/27 02:19:48 thorpej Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.66 2005/06/27 02:29:32 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.65 2005/06/27 02:19:48 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.66 2005/06/27 02:29:32 thorpej Exp $");
#include "fs_nfs.h"
#include "opt_uvmhist.h"
@ -77,13 +77,14 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.65 2005/06/27 02:19:48 thorpej Exp $
* functions
*/
void uvn_detach(struct uvm_object *);
int uvn_get(struct uvm_object *, voff_t, struct vm_page **, int *, int,
vm_prot_t, int, int);
int uvn_put(struct uvm_object *, voff_t, voff_t, int);
void uvn_reference(struct uvm_object *);
static void uvn_detach(struct uvm_object *);
static int uvn_get(struct uvm_object *, voff_t, struct vm_page **, int *,
int, vm_prot_t, int, int);
static int uvn_put(struct uvm_object *, voff_t, voff_t, int);
static void uvn_reference(struct uvm_object *);
int uvn_findpage(struct uvm_object *, voff_t, struct vm_page **, int);
static int uvn_findpage(struct uvm_object *, voff_t, struct vm_page **,
int);
/*
* master pager structure
@ -232,7 +233,7 @@ uvn_attach(void *arg, vm_prot_t accessprot)
* => caller must be using the same accessprot as was used at attach time
*/
void
static void
uvn_reference(struct uvm_object *uobj)
{
VREF((struct vnode *)uobj);
@ -247,7 +248,7 @@ uvn_reference(struct uvm_object *uobj)
* => caller must call with object unlocked and map locked.
*/
void
static void
uvn_detach(struct uvm_object *uobj)
{
vrele((struct vnode *)uobj);
@ -261,7 +262,7 @@ uvn_detach(struct uvm_object *uobj)
* => note: caller must set PG_CLEAN and pmap_clear_modify (if needed)
*/
int
static int
uvn_put(struct uvm_object *uobj, voff_t offlo, voff_t offhi, int flags)
{
struct vnode *vp = (struct vnode *)uobj;
@ -285,7 +286,7 @@ uvn_put(struct uvm_object *uobj, voff_t offlo, voff_t offhi, int flags)
* => NOTE: caller must check for released pages!!
*/
int
static int
uvn_get(struct uvm_object *uobj, voff_t offset,
struct vm_page **pps /* IN/OUT */,
int *npagesp /* IN (OUT if PGO_LOCKED)*/,
@ -342,7 +343,7 @@ uvn_findpages(struct uvm_object *uobj, voff_t offset, int *npagesp,
return (found);
}
int
static int
uvn_findpage(struct uvm_object *uobj, voff_t offset, struct vm_page **pgp,
int flags)
{