summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_aobj.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-03-20 15:19:05 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-03-20 15:19:05 +0000
commit1cec66db340b5071320225ab7544cf7d5891842f (patch)
tree22b949af148fe1ed4ff4f59bdb4179edd3211d0e /sys/uvm/uvm_aobj.c
parent8f59db0d17f07fc6ce24afa8af4713c585ef09a0 (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_aobj.c')
-rw-r--r--sys/uvm/uvm_aobj.c83
1 files changed, 26 insertions, 57 deletions
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;