diff options
author | smart <smart@cvs.openbsd.org> | 2001-03-22 03:05:58 +0000 |
---|---|---|
committer | smart <smart@cvs.openbsd.org> | 2001-03-22 03:05:58 +0000 |
commit | 80fbdb56b71a03079797681445932c9923f5020e (patch) | |
tree | eb00f62b05e7c379bd5703f4122c0c5ff579cfc7 /sys/uvm | |
parent | 44b8e549ef87f77e2b48c08e7c4994efeea39676 (diff) |
Sync style, typo, and comments a little closer to NetBSD. art@ ok
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm.h | 12 | ||||
-rw-r--r-- | sys/uvm/uvm_amap_i.h | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_aobj.c | 18 | ||||
-rw-r--r-- | sys/uvm/uvm_device.c | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_fault.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 8 | ||||
-rw-r--r-- | sys/uvm/uvm_map.c | 13 | ||||
-rw-r--r-- | sys/uvm/uvm_map.h | 33 | ||||
-rw-r--r-- | sys/uvm/uvm_mmap.c | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_page.c | 12 | ||||
-rw-r--r-- | sys/uvm/uvm_page.h | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_pager.c | 34 | ||||
-rw-r--r-- | sys/uvm/uvm_pager.h | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_pdaemon.c | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_swap.h | 9 | ||||
-rw-r--r-- | sys/uvm/uvm_vnode.c | 8 | ||||
-rw-r--r-- | sys/uvm/uvm_vnode.h | 4 |
17 files changed, 83 insertions, 102 deletions
diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index 22f026f92e5..9668bf485dd 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.7 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm.h,v 1.8 2001/03/22 03:05:54 smart Exp $ */ /* $NetBSD: uvm.h,v 1.16 1999/06/21 17:25:11 thorpej Exp $ */ /* @@ -150,15 +150,11 @@ UVMHIST_DECL(pdhist); */ #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG) - #define UVM_UNLOCK_AND_WAIT(event,lock,intr,msg, timo) \ thread_sleep_msg(event,lock,intr,msg, timo) - #else - #define UVM_UNLOCK_AND_WAIT(event,lock,intr,msg, timo) \ thread_sleep_msg(event,NULL,intr,msg, timo) - #endif /* @@ -166,13 +162,9 @@ UVMHIST_DECL(pdhist); */ #if defined(UVM_PAGE_TRKOWN) - #define UVM_PAGE_OWN(PG, TAG) uvm_page_own(PG, TAG) - -#else /* UVM_PAGE_TRKOWN */ - +#else #define UVM_PAGE_OWN(PG, TAG) /* nothing */ - #endif /* UVM_PAGE_TRKOWN */ /* diff --git a/sys/uvm/uvm_amap_i.h b/sys/uvm/uvm_amap_i.h index bd0993c3429..14398330016 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.6 2001/01/29 02:07:42 niklas Exp $ */ +/* $OpenBSD: uvm_amap_i.h,v 1.7 2001/03/22 03:05:54 smart Exp $ */ /* $NetBSD: uvm_amap_i.h,v 1.12 1999/03/25 18:48:49 mrg Exp $ */ /* @@ -174,7 +174,7 @@ amap_unadd(amap, slot) UVMHIST_FUNC("amap_unadd"); UVMHIST_CALLED(maphist); if (slot >= amap->am_nslot) - panic("amap_add: offset out of range"); + panic("amap_unadd: offset out of range"); if (amap->am_anon[slot] == NULL) panic("amap_unadd: nothing there"); diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 79d294f19fc..34341c5361b 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_aobj.c,v 1.8 2001/03/08 15:21:36 smart Exp $ */ -/* $NetBSD: uvm_aobj.c,v 1.20 1999/05/25 00:09:00 thorpej Exp $ */ +/* $OpenBSD: uvm_aobj.c,v 1.9 2001/03/22 03:05:54 smart Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.21 1999/07/07 05:32:26 thorpej Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -719,9 +719,13 @@ uao_flush(uobj, start, end, flags) */ /* * XXX - * deal with PGO_DEACTIVATE (for madvise(MADV_SEQUENTIAL)) - * and PGO_FREE (for msync(MSINVALIDATE)) - */ + * Deal with: + * + * PGO_DEACTIVATE for sequential access, via uvm_fault(), and + * for MADV_DONTNEED + * + * PGO_FREE for MADV_FREE and MSINVALIDATE + */ return TRUE; } @@ -920,8 +924,8 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) UVMHIST_LOG(pdhist, "sleeping, ptmp->flags 0x%x\n", ptmp->flags,0,0,0); - UVM_UNLOCK_AND_WAIT(ptmp, &uobj->vmobjlock, 0, - "uao_get", 0); + UVM_UNLOCK_AND_WAIT(ptmp, &uobj->vmobjlock, + FALSE, "uao_get", 0); simple_lock(&uobj->vmobjlock); continue; /* goto top of pps while loop */ } diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index fe6a53e661b..ac7085baa10 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_device.c,v 1.6 2001/01/29 02:07:43 niklas Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.7 2001/03/22 03:05:54 smart Exp $ */ /* $NetBSD: uvm_device.c,v 1.16 1999/04/08 10:26:21 drochner Exp $ */ /* @@ -477,11 +477,10 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) ufi->orig_map->pmap, curr_va, (int)paddr, access_type); pmap_enter(ufi->orig_map->pmap, curr_va, paddr, access_type, 0, access_type); - } uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj, NULL); - return(retval); + return (retval); } /* diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index 4be4a10c3f7..cf8a9345b9e 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.8 2001/03/09 14:20:51 art Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.9 2001/03/22 03:05:55 smart Exp $ */ /* $NetBSD: uvm_fault.c,v 1.35 1999/06/16 18:43:28 thorpej Exp $ */ /* @@ -1775,7 +1775,7 @@ uvm_fault_unwire(map, start, end) * the PAs from the pmap. we also lock out the page daemon so that * we can call uvm_pageunwire. */ - + uvm_lock_pageq(); for (va = start; va < end ; va += PAGE_SIZE) { diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index e09e3199271..956c913bed5 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.8 2001/03/08 15:21:36 smart Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.9 2001/03/22 03:05:55 smart Exp $ */ /* $NetBSD: uvm_km.c,v 1.27 1999/06/04 23:38:41 thorpej Exp $ */ /* @@ -357,8 +357,8 @@ uvm_km_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) /* page is there, see if we need to wait on it */ if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) { ptmp->flags |= PG_WANTED; - UVM_UNLOCK_AND_WAIT(ptmp,&uobj->vmobjlock, 0, - "uvn_get",0); + UVM_UNLOCK_AND_WAIT(ptmp,&uobj->vmobjlock, + FALSE, "uvn_get",0); simple_lock(&uobj->vmobjlock); continue; /* goto top of pps while loop */ } @@ -950,7 +950,7 @@ uvm_km_alloc1(map, size, zeroit) panic("uvm_km_alloc1: non-released page"); pg->flags |= PG_WANTED; UVM_UNLOCK_AND_WAIT(pg, &uvm.kernel_object->vmobjlock, - 0, "km_alloc", 0); + FALSE, "km_alloc", 0); continue; /* retry */ } diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 36548caa3d0..4a159dd98a7 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.10 2001/03/15 10:30:57 art Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.11 2001/03/22 03:05:55 smart Exp $ */ /* $NetBSD: uvm_map.c,v 1.56 1999/06/16 19:34:24 thorpej Exp $ */ /* @@ -203,7 +203,6 @@ do { \ (void) lockmgr(&(map)->lock, LK_UPGRADE, NULL, curproc) #endif /* DIAGNOSTIC */ - /* * uvm_mapent_alloc: allocate a map entry * @@ -1760,7 +1759,7 @@ uvm_map_protect(map, start, end, new_prot, set_max) vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } - current = current->next; + current = current->next; } /* go back and fix up protections (no need to clip this time). */ @@ -1785,12 +1784,11 @@ uvm_map_protect(map, start, end, new_prot, set_max) */ if (current->protection != old_prot) { - /* update pmap! */ pmap_protect(map->pmap, current->start, current->end, current->protection & MASK(entry)); - } + current = current->next; } @@ -1884,7 +1882,7 @@ uvm_map_advice(map, start, end, new_advice) } else { entry = temp_entry->next; } - + while ((entry != &map->header) && (entry->start < end)) { UVM_MAP_CLIP_END(map, entry, end); @@ -2422,8 +2420,7 @@ uvm_map_clean(map, start, end, flags) vaddr_t start, end; int flags; { - vm_map_entry_t current; - vm_map_entry_t entry; + vm_map_entry_t current, entry; vsize_t size; struct uvm_object *object; vaddr_t offset; diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h index c222c2b6039..039cbbd3bdb 100644 --- a/sys/uvm/uvm_map.h +++ b/sys/uvm/uvm_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm_map.h,v 1.7 2001/03/22 03:05:55 smart Exp $ */ /* $NetBSD: uvm_map.h,v 1.15 1999/06/21 17:25:11 thorpej Exp $ */ /* @@ -135,34 +135,25 @@ MAP_INLINE void uvm_map_deallocate __P((vm_map_t)); int uvm_map_clean __P((vm_map_t, vaddr_t, vaddr_t, int)); -void uvm_map_clip_start __P((vm_map_t, - vm_map_entry_t, vaddr_t)); -void uvm_map_clip_end __P((vm_map_t, vm_map_entry_t, - vaddr_t)); +void uvm_map_clip_start __P((vm_map_t, vm_map_entry_t, vaddr_t)); +void uvm_map_clip_end __P((vm_map_t, vm_map_entry_t, vaddr_t)); MAP_INLINE -vm_map_t uvm_map_create __P((pmap_t, vaddr_t, - vaddr_t, int)); +vm_map_t uvm_map_create __P((pmap_t, vaddr_t, vaddr_t, int)); int uvm_map_extract __P((vm_map_t, vaddr_t, vsize_t, vm_map_t, vaddr_t *, int)); -vm_map_entry_t uvm_map_findspace __P((vm_map_t, vaddr_t, vsize_t, - vaddr_t *, struct uvm_object *, vaddr_t, - boolean_t)); -int uvm_map_inherit __P((vm_map_t, vaddr_t, vaddr_t, - vm_inherit_t)); +vm_map_entry_t uvm_map_findspace __P((vm_map_t, vaddr_t, vsize_t, vaddr_t *, + struct uvm_object *, vaddr_t, boolean_t)); +int uvm_map_inherit __P((vm_map_t, vaddr_t, vaddr_t, vm_inherit_t)); int uvm_map_advice __P((vm_map_t, vaddr_t, vaddr_t, int)); void uvm_map_init __P((void)); -boolean_t uvm_map_lookup_entry __P((vm_map_t, vaddr_t, - vm_map_entry_t *)); +boolean_t uvm_map_lookup_entry __P((vm_map_t, vaddr_t, vm_map_entry_t *)); MAP_INLINE void uvm_map_reference __P((vm_map_t)); -int uvm_map_replace __P((vm_map_t, vaddr_t, vaddr_t, +int uvm_map_replace __P((vm_map_t, vaddr_t, vaddr_t, vm_map_entry_t, int)); -int uvm_map_reserve __P((vm_map_t, vsize_t, vaddr_t, - vaddr_t *)); -void uvm_map_setup __P((vm_map_t, vaddr_t, - vaddr_t, int)); -int uvm_map_submap __P((vm_map_t, vaddr_t, - vaddr_t, vm_map_t)); +int uvm_map_reserve __P((vm_map_t, vsize_t, vaddr_t, vaddr_t *)); +void uvm_map_setup __P((vm_map_t, vaddr_t, vaddr_t, int)); +int uvm_map_submap __P((vm_map_t, vaddr_t, vaddr_t, vm_map_t)); MAP_INLINE int uvm_unmap __P((vm_map_t, vaddr_t, vaddr_t)); void uvm_unmap_detach __P((vm_map_entry_t,int)); diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index af53c530bad..56e23b78352 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.9 2001/03/09 17:49:34 art Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.10 2001/03/22 03:05:56 smart Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.23 1999/06/16 17:25:39 minoura Exp $ */ /* @@ -841,6 +841,7 @@ sys_madvise(p, v, retval) case KERN_PROTECTION_FAILURE: return (EACCES); } + return (EINVAL); } @@ -1066,8 +1067,7 @@ uvm_mmap(map, addr, size, prot, maxprot, flags, handle, foff) */ if (flags & MAP_ANON) { - - foff = UVM_UNKNOWN_OFFSET; + foff = UVM_UNKNOWN_OFFSET; uobj = NULL; if ((flags & MAP_SHARED) == 0) /* XXX: defer amap create */ diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 86f834c0fdf..f5daf611969 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.13 2001/03/08 15:21:37 smart Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.14 2001/03/22 03:05:56 smart Exp $ */ /* $NetBSD: uvm_page.c,v 1.24 1999/07/22 22:58:38 thorpej Exp $ */ /* @@ -109,8 +109,8 @@ static vaddr_t virtual_space_end; /* * we use a hash table with only one bucket during bootup. we will - * later rehash (resize) the hash table once malloc() is ready. - * we static allocate the bootstrap bucket below... + * later rehash (resize) the hash table once the allocator is ready. + * we static allocate the one bootstrap bucket below... */ static struct pglist uvm_bootbucket; @@ -229,7 +229,7 @@ uvm_page_init(kvm_startp, kvm_endp) /* * step 2: init the <obj,offset> => <page> hash table. for now * we just have one bucket (the bootstrap bucket). later on we - * will malloc() new buckets as we dynamically resize the hash table. + * will allocate new buckets as we dynamically resize the hash table. */ uvm.page_nhash = 1; /* 1 bucket */ @@ -746,7 +746,7 @@ uvm_page_rehash() MALLOC(newbuckets, struct pglist *, sizeof(struct pglist) * bucketcount, M_VMPBUCKET, M_NOWAIT); if (newbuckets == NULL) { - printf("vm_page_physrehash: WARNING: could not grow page " + printf("uvm_page_physrehash: WARNING: could not grow page " "hash table\n"); return; } @@ -779,7 +779,7 @@ uvm_page_rehash() splx(s); /* - * free old bucket array if we malloc'd it previously + * free old bucket array if is not the boot-time table */ if (oldbuckets != &uvm_bootbucket) diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h index d5bbb726820..08fee83ed07 100644 --- a/sys/uvm/uvm_page.h +++ b/sys/uvm/uvm_page.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm_page.h,v 1.7 2001/03/22 03:05:56 smart Exp $ */ /* $NetBSD: uvm_page.h,v 1.13 1999/06/21 17:25:12 thorpej Exp $ */ /* @@ -117,8 +117,7 @@ vaddr_t uvm_pageboot_alloc __P((vsize_t)); PAGE_INLINE void uvm_pagecopy __P((struct vm_page *, struct vm_page *)); PAGE_INLINE void uvm_pagedeactivate __P((struct vm_page *)); void uvm_pagefree __P((struct vm_page *)); -PAGE_INLINE struct vm_page *uvm_pagelookup - __P((struct uvm_object *, vaddr_t)); +PAGE_INLINE struct vm_page *uvm_pagelookup __P((struct uvm_object *, vaddr_t)); void uvm_pageremove __P((struct vm_page *)); /* uvm_pagerename: not needed */ PAGE_INLINE void uvm_pageunwire __P((struct vm_page *)); diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c index b0def7ef9fd..f756154021f 100644 --- a/sys/uvm/uvm_pager.c +++ b/sys/uvm/uvm_pager.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_pager.c,v 1.7 2001/03/08 15:21:37 smart Exp $ */ -/* $NetBSD: uvm_pager.c,v 1.20 1999/05/26 19:16:36 thorpej Exp $ */ +/* $OpenBSD: uvm_pager.c,v 1.8 2001/03/22 03:05:56 smart Exp $ */ +/* $NetBSD: uvm_pager.c,v 1.22 1999/07/22 22:58:39 thorpej Exp $ */ /* * @@ -328,7 +328,7 @@ uvm_mk_pcluster(uobj, pps, npages, center, flags, mlo, mhi) if ((pclust->flags & (PG_CLEAN|PG_BUSY)) == PG_CLEAN && pmap_is_modified(PMAP_PGARG(pclust))) - pclust->flags &= ~PG_CLEAN; + pclust->flags &= ~PG_CLEAN; /* now checked */ pclust->flags |= PG_CLEANCHK; } @@ -442,7 +442,7 @@ uvm_pager_put(uobj, pg, ppsp_ptr, npages, flags, start, stop) struct vm_page *pg, ***ppsp_ptr;/* IN, IN/OUT */ int *npages; /* IN/OUT */ int flags; /* IN */ - vaddr_t start, stop; /* IN, IN */ + vaddr_t start, stop; /* IN, IN */ { int result; daddr_t swblk; @@ -468,8 +468,8 @@ uvm_pager_put(uobj, pg, ppsp_ptr, npages, flags, start, stop) } else { ppsp[0] = pg; *npages = 1; - } - + } + swblk = 0; /* XXX: keep gcc happy */ } else { @@ -538,8 +538,9 @@ ReTry: } /* - * a pager error occured. if we have clustered, we drop the - * cluster and try again. + * a pager error occured. + * for transient errors, drop to a cluster of 1 page ("pg") + * and try again. for hard errors, don't bother retrying. */ if (*npages > 1 || pg == NULL) { @@ -581,15 +582,14 @@ ReTry: * [only meaningful if swap-backed (uobj == NULL)] */ - -void uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags, swblk) - -struct uvm_object *uobj; /* IN */ -struct vm_page *pg, **ppsp; /* IN, IN/OUT */ -int *npages; /* IN/OUT */ -int flags; -int swblk; /* valid if (uobj == NULL && PGO_REALLOCSWAP) */ - +void +uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags, swblk) + struct uvm_object *uobj; /* IN */ + struct vm_page *pg, **ppsp; /* IN, IN/OUT */ + int *npages; /* IN/OUT */ + int flags; + int swblk; /* valid if + (uobj == NULL && PGO_REALLOCSWAP) */ { int lcv; boolean_t obj_is_alive; diff --git a/sys/uvm/uvm_pager.h b/sys/uvm/uvm_pager.h index 2cc33ba0e34..5c594595146 100644 --- a/sys/uvm/uvm_pager.h +++ b/sys/uvm/uvm_pager.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pager.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm_pager.h,v 1.7 2001/03/22 03:05:56 smart Exp $ */ /* $NetBSD: uvm_pager.h,v 1.10 1999/06/21 17:25:12 thorpej Exp $ */ /* @@ -72,8 +72,7 @@ struct uvm_pagerops { vm_page_t *, int, int, vm_fault_t, vm_prot_t, int)); boolean_t (*pgo_flush) /* flush pages out of obj */ - __P((struct uvm_object *, vaddr_t, - vaddr_t, int)); + __P((struct uvm_object *, vaddr_t, vaddr_t, int)); int (*pgo_get) /* get/read page */ __P((struct uvm_object *, vaddr_t, vm_page_t *, int *, int, vm_prot_t, int, int)); diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index d19c5f4d09c..9f492be2a87 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.8 2001/03/08 15:21:37 smart Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.9 2001/03/22 03:05:56 smart Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.17 1999/07/22 22:58:39 thorpej Exp $ */ /* @@ -109,7 +109,8 @@ static void uvmpd_tune __P((void)); * => should _not_ be called by the page daemon (to avoid deadlock) */ -void uvm_wait(wmsg) +void +uvm_wait(wmsg) char *wmsg; { int timo = 0; diff --git a/sys/uvm/uvm_swap.h b/sys/uvm/uvm_swap.h index 3438d15d7e3..bbbbe2af391 100644 --- a/sys/uvm/uvm_swap.h +++ b/sys/uvm/uvm_swap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm_swap.h,v 1.7 2001/03/22 03:05:57 smart Exp $ */ /* $NetBSD: uvm_swap.h,v 1.4 1999/06/21 17:25:12 thorpej Exp $ */ /* @@ -37,10 +37,9 @@ #ifdef _KERNEL int uvm_swap_get __P((struct vm_page *, int, int)); -int uvm_swap_put __P((int, struct vm_page **, int, - int)); -int uvm_swap_alloc __P((int *wanted, boolean_t lessok)); -void uvm_swap_free __P((int startslot, int nslots)); +int uvm_swap_put __P((int, struct vm_page **, int, int)); +int uvm_swap_alloc __P((int *, boolean_t)); +void uvm_swap_free __P((int, int)); #ifdef UVM_SWAP_ENCRYPT void uvm_swap_initcrypt_all __P((void)); diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index ed0b58afc1f..8219e4faf87 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.11 2001/03/08 15:21:38 smart Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.12 2001/03/22 03:05:57 smart Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.23 1999/04/11 04:04:11 chs Exp $ */ /* @@ -553,7 +553,7 @@ uvm_vnp_terminate(vp) /* * must be a valid uvn that is not already dying (because XLOCK - * protects us from that). the uvn can't in the the ALOCK state + * protects us from that). the uvn can't in the ALOCK state * because it is valid, and uvn's that are in the ALOCK state haven't * been marked valid yet. */ @@ -1476,7 +1476,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) { ptmp->flags |= PG_WANTED; UVM_UNLOCK_AND_WAIT(ptmp, - &uobj->vmobjlock, 0, "uvn_get",0); + &uobj->vmobjlock, FALSE, "uvn_get",0); simple_lock(&uobj->vmobjlock); continue; /* goto top of pps while loop */ } @@ -1736,7 +1736,7 @@ uvn_io(uvn, pps, npages, flags, rw) result = EIO; /* XXX: error? */ } else if (got < PAGE_SIZE * npages && rw == UIO_READ) { memset((void *) (kva + got), 0, - (npages << PAGE_SHIFT) - got); + (npages << PAGE_SHIFT) - got); } } diff --git a/sys/uvm/uvm_vnode.h b/sys/uvm/uvm_vnode.h index 644ce8ee6a8..cf5285c158f 100644 --- a/sys/uvm/uvm_vnode.h +++ b/sys/uvm/uvm_vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */ +/* $OpenBSD: uvm_vnode.h,v 1.7 2001/03/22 03:05:57 smart Exp $ */ /* $NetBSD: uvm_vnode.h,v 1.8 1999/06/21 17:25:12 thorpej Exp $ */ /* @@ -54,7 +54,7 @@ struct uvm_vnode { struct uvm_object u_obj; /* the actual VM object */ int u_flags; /* flags */ int u_nio; /* number of running I/O requests */ - vsize_t u_size; /* size of object */ + vsize_t u_size; /* size of object */ /* the following entry is locked by uvn_wl_lock */ LIST_ENTRY(uvm_vnode) u_wlist; /* list of writeable vnode objects */ |