Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm ansi'fy.
details: https://anonhg.NetBSD.org/src/rev/ec70b7836c21
branches: trunk
changeset: 552739:ec70b7836c21
user: enami <enami%NetBSD.org@localhost>
date: Wed Oct 01 22:50:15 2003 +0000
description:
ansi'fy.
diffstat:
sys/uvm/uvm_map.c | 205 +++++++++++++++------------------------------------
sys/uvm/uvm_map.h | 71 ++++++++---------
sys/uvm/uvm_map_i.h | 19 +---
3 files changed, 103 insertions(+), 192 deletions(-)
diffs (truncated from 631 to 300 lines):
diff -r 89fdaa8d7026 -r ec70b7836c21 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Wed Oct 01 21:51:15 2003 +0000
+++ b/sys/uvm/uvm_map.c Wed Oct 01 22:50:15 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.137 2003/08/26 15:12:18 yamt Exp $ */
+/* $NetBSD: uvm_map.c,v 1.138 2003/10/01 22:50:15 enami Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.137 2003/08/26 15:12:18 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.138 2003/10/01 22:50:15 enami Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -193,12 +193,13 @@
* local prototypes
*/
-static struct vm_map_entry *uvm_mapent_alloc __P((struct vm_map *, int));
-static void uvm_mapent_copy __P((struct vm_map_entry *, struct vm_map_entry *));
-static void uvm_mapent_free __P((struct vm_map_entry *));
-static void uvm_map_entry_unwire __P((struct vm_map *, struct vm_map_entry *));
-static void uvm_map_reference_amap __P((struct vm_map_entry *, int));
-static void uvm_map_unreference_amap __P((struct vm_map_entry *, int));
+static struct vm_map_entry *
+ uvm_mapent_alloc(struct vm_map *, int);
+static void uvm_mapent_copy(struct vm_map_entry *, struct vm_map_entry *);
+static void uvm_mapent_free(struct vm_map_entry *);
+static void uvm_map_entry_unwire(struct vm_map *, struct vm_map_entry *);
+static void uvm_map_reference_amap(struct vm_map_entry *, int);
+static void uvm_map_unreference_amap(struct vm_map_entry *, int);
/*
* local inlines
@@ -209,9 +210,7 @@
*/
static __inline struct vm_map_entry *
-uvm_mapent_alloc(map, flags)
- struct vm_map *map;
- int flags;
+uvm_mapent_alloc(struct vm_map *map, int flags)
{
struct vm_map_entry *me;
int s;
@@ -253,8 +252,7 @@
*/
static __inline void
-uvm_mapent_free(me)
- struct vm_map_entry *me;
+uvm_mapent_free(struct vm_map_entry *me)
{
int s;
UVMHIST_FUNC("uvm_mapent_free"); UVMHIST_CALLED(maphist);
@@ -280,9 +278,7 @@
*/
static __inline void
-uvm_mapent_copy(src, dst)
- struct vm_map_entry *src;
- struct vm_map_entry *dst;
+uvm_mapent_copy(struct vm_map_entry *src, struct vm_map_entry *dst)
{
memcpy(dst, src, ((char *)&src->uvm_map_entry_stop_copy) -
((char *)src));
@@ -295,9 +291,7 @@
*/
static __inline void
-uvm_map_entry_unwire(map, entry)
- struct vm_map *map;
- struct vm_map_entry *entry;
+uvm_map_entry_unwire(struct vm_map *map, struct vm_map_entry *entry)
{
entry->wired_count = 0;
uvm_fault_unwire_locked(map, entry->start, entry->end);
@@ -308,9 +302,7 @@
* wrapper for calling amap_ref()
*/
static __inline void
-uvm_map_reference_amap(entry, flags)
- struct vm_map_entry *entry;
- int flags;
+uvm_map_reference_amap(struct vm_map_entry *entry, int flags)
{
amap_ref(entry->aref.ar_amap, entry->aref.ar_pageoff,
(entry->end - entry->start) >> PAGE_SHIFT, flags);
@@ -321,9 +313,7 @@
* wrapper for calling amap_unref()
*/
static __inline void
-uvm_map_unreference_amap(entry, flags)
- struct vm_map_entry *entry;
- int flags;
+uvm_map_unreference_amap(struct vm_map_entry *entry, int flags)
{
amap_unref(entry->aref.ar_amap, entry->aref.ar_pageoff,
(entry->end - entry->start) >> PAGE_SHIFT, flags);
@@ -336,7 +326,7 @@
*/
void
-uvm_map_init()
+uvm_map_init(void)
{
static struct vm_map_entry kernel_map_entry[MAX_KMAPENT];
#if defined(UVMHIST)
@@ -414,10 +404,8 @@
*/
void
-uvm_map_clip_start(map, entry, start)
- struct vm_map *map;
- struct vm_map_entry *entry;
- vaddr_t start;
+uvm_map_clip_start(struct vm_map *map, struct vm_map_entry *entry,
+ vaddr_t start)
{
struct vm_map_entry *new_entry;
vaddr_t new_adj;
@@ -467,10 +455,7 @@
*/
void
-uvm_map_clip_end(map, entry, end)
- struct vm_map *map;
- struct vm_map_entry *entry;
- vaddr_t end;
+uvm_map_clip_end(struct vm_map *map, struct vm_map_entry *entry, vaddr_t end)
{
struct vm_map_entry * new_entry;
vaddr_t new_adj; /* #bytes we move start forward */
@@ -536,14 +521,8 @@
*/
int
-uvm_map(map, startp, size, uobj, uoffset, align, flags)
- struct vm_map *map;
- vaddr_t *startp; /* IN/OUT */
- vsize_t size;
- struct uvm_object *uobj;
- voff_t uoffset;
- vsize_t align;
- uvm_flag_t flags;
+uvm_map(struct vm_map *map, vaddr_t *startp /* IN/OUT */, vsize_t size,
+ struct uvm_object *uobj, voff_t uoffset, vsize_t align, uvm_flag_t flags)
{
struct vm_map_entry *prev_entry, *new_entry;
const int amapwaitflag = (flags & UVM_FLAG_NOWAIT) ?
@@ -969,10 +948,8 @@
*/
boolean_t
-uvm_map_lookup_entry(map, address, entry)
- struct vm_map *map;
- vaddr_t address;
- struct vm_map_entry **entry; /* OUT */
+uvm_map_lookup_entry(struct vm_map *map, vaddr_t address,
+ struct vm_map_entry **entry /* OUT */)
{
struct vm_map_entry *cur;
struct vm_map_entry *last;
@@ -1069,15 +1046,9 @@
*/
struct vm_map_entry *
-uvm_map_findspace(map, hint, length, result, uobj, uoffset, align, flags)
- struct vm_map *map;
- vaddr_t hint;
- vsize_t length;
- vaddr_t *result; /* OUT */
- struct uvm_object *uobj;
- voff_t uoffset;
- vsize_t align;
- int flags;
+uvm_map_findspace(struct vm_map *map, vaddr_t hint, vsize_t length,
+ vaddr_t *result /* OUT */, struct uvm_object *uobj, voff_t uoffset,
+ vsize_t align, int flags)
{
struct vm_map_entry *entry, *next, *tmp;
vaddr_t end, orig_hint;
@@ -1240,10 +1211,8 @@
*/
void
-uvm_unmap_remove(map, start, end, entry_list)
- struct vm_map *map;
- vaddr_t start, end;
- struct vm_map_entry **entry_list; /* OUT */
+uvm_unmap_remove(struct vm_map *map, vaddr_t start, vaddr_t end,
+ struct vm_map_entry **entry_list /* OUT */)
{
struct vm_map_entry *entry, *first_entry, *next;
vaddr_t len;
@@ -1419,9 +1388,7 @@
*/
void
-uvm_unmap_detach(first_entry, flags)
- struct vm_map_entry *first_entry;
- int flags;
+uvm_unmap_detach(struct vm_map_entry *first_entry, int flags)
{
struct vm_map_entry *next_entry;
UVMHIST_FUNC("uvm_unmap_detach"); UVMHIST_CALLED(maphist);
@@ -1473,12 +1440,10 @@
*/
int
-uvm_map_reserve(map, size, offset, align, raddr)
- struct vm_map *map;
- vsize_t size;
- vaddr_t offset; /* hint for pmap_prefer */
- vsize_t align; /* alignment hint */
- vaddr_t *raddr; /* IN:hint, OUT: reserved VA */
+uvm_map_reserve(struct vm_map *map, vsize_t size,
+ vaddr_t offset /* hint for pmap_prefer */,
+ vsize_t align /* alignment hint */,
+ vaddr_t *raddr /* IN:hint, OUT: reserved VA */)
{
UVMHIST_FUNC("uvm_map_reserve"); UVMHIST_CALLED(maphist);
@@ -1516,11 +1481,8 @@
*/
int
-uvm_map_replace(map, start, end, newents, nnewents)
- struct vm_map *map;
- vaddr_t start, end;
- struct vm_map_entry *newents;
- int nnewents;
+uvm_map_replace(struct vm_map *map, vaddr_t start, vaddr_t end,
+ struct vm_map_entry *newents, int nnewents)
{
struct vm_map_entry *oldent, *last;
@@ -1634,11 +1596,8 @@
*/
int
-uvm_map_extract(srcmap, start, len, dstmap, dstaddrp, flags)
- struct vm_map *srcmap, *dstmap;
- vaddr_t start, *dstaddrp;
- vsize_t len;
- int flags;
+uvm_map_extract(struct vm_map *srcmap, vaddr_t start, vsize_t len,
+ struct vm_map *dstmap, vaddr_t *dstaddrp, int flags)
{
vaddr_t dstaddr, end, newend, oldoffset, fudge, orig_fudge,
oldstart;
@@ -1965,9 +1924,8 @@
*/
int
-uvm_map_submap(map, start, end, submap)
- struct vm_map *map, *submap;
- vaddr_t start, end;
+uvm_map_submap(struct vm_map *map, vaddr_t start, vaddr_t end,
+ struct vm_map *submap)
{
struct vm_map_entry *entry;
int error;
@@ -2010,11 +1968,8 @@
~VM_PROT_WRITE : VM_PROT_ALL)
int
-uvm_map_protect(map, start, end, new_prot, set_max)
- struct vm_map *map;
- vaddr_t start, end;
- vm_prot_t new_prot;
- boolean_t set_max;
+uvm_map_protect(struct vm_map *map, vaddr_t start, vaddr_t end,
+ vm_prot_t new_prot, boolean_t set_max)
{
struct vm_map_entry *current, *entry;
int error = 0;
@@ -2154,11 +2109,8 @@
*/
int
-uvm_map_inherit(map, start, end, new_inheritance)
- struct vm_map *map;
- vaddr_t start;
- vaddr_t end;
- vm_inherit_t new_inheritance;
+uvm_map_inherit(struct vm_map *map, vaddr_t start, vaddr_t end,
+ vm_inherit_t new_inheritance)
{
struct vm_map_entry *entry, *temp_entry;
UVMHIST_FUNC("uvm_map_inherit"); UVMHIST_CALLED(maphist);
@@ -2200,11 +2152,7 @@
*/
int
-uvm_map_advice(map, start, end, new_advice)
Home |
Main Index |
Thread Index |
Old Index